Package com.ibm.ws.security.core

Examples of com.ibm.ws.security.core.ContextManager


        {
            String password = extractPassword(credentials);

            if (password != null)
            {
                ContextManager contextManager = ContextManagerFactory.getInstance();

                Subject subject =
                    contextManager.login(contextManager.getDefaultRealm(),
                            username, password);

                if (subject != null)
                {
                    //setting the caller subject really doesn't apply for long
                    //it appears to be removed later as each call to
                    //ContextManagerFactory.getInstance()
                    //returns a new instance and we cannot get the real context
                    //and assign values that will be re-used.
                    //this also means that the HttpServletRequest will not have the
                    //information that we've assigned, hence we store this contextManager
                    //in the Principal for later use

                    contextManager.setCallerSubject(subject);
                    principal = new WSLCPrincipal(username, contextManager, subject);
                }
            }
        }
        catch (WSLoginFailedException wsLoginFailedException)
View Full Code Here


            Log.getLogger(LogCategories.SECURITY).debug("WebSphereLoginCommand#doAuthorization(). Principal: " + principal + ", Principal class: " + principal.getClass().getName()
                    + ", 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()));
View Full Code Here

        {
            String password = extractPassword(credentials);

            if (password != null)
            {
                ContextManager contextManager = ContextManagerFactory.getInstance();

                Subject subject =
                    contextManager.login(contextManager.getDefaultRealm(),
                            username, password);

                if (subject != null)
                {
                    //setting the caller subject really doesn't apply for long
                    //it appears to be removed later as each call to
                    //ContextManagerFactory.getInstance()
                    //returns a new instance and we cannot get the real context
                    //and assign values that will be re-used.
                    //this also means that the HttpServletRequest will not have the
                    //information that we've assigned, hence we store this contextManager
                    //in the Principal for later use

                    contextManager.setCallerSubject(subject);
                    principal = new WSLCPrincipal(username, contextManager, subject);
                }
            }
        }
        catch (WSLoginFailedException wsLoginFailedException)
View Full Code Here

        //every time
       
        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()));
View Full Code Here

TOP

Related Classes of com.ibm.ws.security.core.ContextManager

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.