Examples of LDAPRealmAuthenticationPolicy


Examples of org.apache.tuscany.sca.policy.security.http.LDAPRealmAuthenticationPolicy

        Subject subject = null;
        Subject authenticatedSubject = null;


        // Perform user authentication   
        LDAPRealmAuthenticationPolicy authenticationPolicy = authenticationPolicies.get(0);
        if( authenticationPolicy != null) {
            subject = HttpSecurityUtil.getSubject(msg);
            CallbackHandler callbackHandler = new LDAPRealmAuthenticationCallbackHandler(subject);

            /* Uses Geronimo to login */
            LoginContext geronimoLoginContext = ContextManager.login(authenticationPolicy.getRealmConfigurationName(), callbackHandler);

            authenticatedSubject = geronimoLoginContext.getSubject();
            ContextManager.setCallers(authenticatedSubject, authenticatedSubject);
            if (authenticatedSubject != null) {
                //TODO: add authenticated subject to the msg header ?
View Full Code Here

Examples of org.apache.tuscany.sca.policy.security.http.LDAPRealmAuthenticationPolicy

        Subject subject = null;
        Subject authenticatedSubject = null;


        // Perform user authentication   
        LDAPRealmAuthenticationPolicy authenticationPolicy = authenticationPolicies.get(0);
        if( authenticationPolicy != null) {
            subject = HttpSecurityUtil.getSubject(msg);
            CallbackHandler callbackHandler = new LDAPRealmAuthenticationCallbackHandler(subject);

            /* Uses Geronimo to login */
            try {
                LoginContext geronimoLoginContext = ContextManager.login(authenticationPolicy.getRealmConfigurationName(), callbackHandler);
               
                authenticatedSubject = geronimoLoginContext.getSubject();
                ContextManager.setCallers(authenticatedSubject, authenticatedSubject);
                if (authenticatedSubject != null) {
                    //TODO: add authenticated subject to the msg header ?
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.