Package com.ibm.websphere.security

Examples of com.ibm.websphere.security.UserRegistry


                    + ", Principal identity: " + System.identityHashCode(principal));
       
        if (principal instanceof WSLCPrincipal) // This code path is hit if this login command handled authentication.
        {
            ContextManager contextManager = ((WSLCPrincipal)principal).getContextManager();
            UserRegistry registry = contextManager.getRegistry(contextManager.getDefaultRealm());
           
            try
            {
                List groups = new ArrayList(registry.getGroupsForUser(principal.getName()));

                groups.retainAll(roles);
              
                // if authorization succeeds, set the user's Subject on this invocation context
                // so that the rest of the Thread is executed in the context of the appropriate Subject
View Full Code Here


       
        if (principal == null)
            return false;
       
        ContextManager contextManager = ((WSLCPrincipal)principal).getContextManager();
        UserRegistry registry = contextManager.getRegistry(contextManager.getDefaultRealm());
       
        try
        {
            List groups = new ArrayList(registry.getGroupsForUser(principal.getName()));

            groups.retainAll(roles);
          
            // if authorization succeeds, set the user's Subject on this invocation context
            // so that the rest of the Thread is executed in the context of the appropriate Subject
View Full Code Here

    }

    private List<String> groupIdsFromTokenRoles(FederationResponse federationResponse) throws Exception {
        InitialContext ctx = new InitialContext();
        UserRegistry reg = (UserRegistry)ctx.lookup(Constants.USER_REGISTRY_JNDI_NAME);

        List<String> localGroups = mapper.groupsFromRoles(federationResponse.getRoles());

        List<String> groupIds = new ArrayList<String>(1);
        if (localGroups != null) {
View Full Code Here

TOP

Related Classes of com.ibm.websphere.security.UserRegistry

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.