Examples of AnonymousAuthenticationToken


Examples of org.springframework.security.authentication.AnonymousAuthenticationToken

            UserDetails userDetails = userDetailsService.loadUserByUsername(username);
            principal = userDetails;
            authorities = new ArrayList(userDetails.getAuthorities());
        }

        AnonymousAuthenticationToken auth = new AnonymousAuthenticationToken(key, principal, authorities);
        auth.setDetails(authenticationDetailsSource.buildDetails(request));

        return auth;
    }
View Full Code Here

Examples of org.springframework.security.providers.anonymous.AnonymousAuthenticationToken

      String role = PentahoSystem
        .getSystemSetting( "anonymous-authentication/anonymous-role", "Anonymous" ); //$NON-NLS-1$//$NON-NLS-2$
      GrantedAuthority[] authorities = new GrantedAuthority[] { new GrantedAuthorityImpl( role ) };

      Authentication auth =
        new AnonymousAuthenticationToken( "anonymousUser", new User( user, "ignored", true, true, true, true,
          authorities ), authorities );

      SecurityContextHolder.getContext().setAuthentication( auth );
      return callable.call();
    } finally {
View Full Code Here

Examples of org.springframework.security.providers.anonymous.AnonymousAuthenticationToken

        for (int i = 0; i < auths.length; i++) {
            roles[i] = new XACMLRole(auths[i].getAuthority());
            roles[i].setRoleAttributesProcessed(true); // No userinfo for anonymous
        }

        AnonymousAuthenticationToken auth = new AnonymousAuthenticationToken(getKey(),
                getUserAttribute().getPassword(), roles);
        auth.setDetails(authenticationDetailsSource.buildDetails((HttpServletRequest) request));
        return auth;
    }
View Full Code Here

Examples of org.springframework.security.providers.anonymous.AnonymousAuthenticationToken

        for (int i = 0; i < auths.length; i++) {
            roles[i] = new XACMLRole(auths[i].getAuthority());
            roles[i].setRoleAttributesProcessed(true); // No userinfo for anonymous
        }

        AnonymousAuthenticationToken auth = new AnonymousAuthenticationToken(getKey(),
                getUserAttribute().getPassword(), roles);
        auth.setDetails(authenticationDetailsSource.buildDetails((HttpServletRequest) request));
        return auth;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.