Package org.springframework.security.providers.anonymous

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


        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

        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

Related Classes of org.springframework.security.providers.anonymous.AnonymousAuthenticationToken

Copyright © 2018 www.massapicom. 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.