Package org.gatein.security.oauth.spi

Examples of org.gatein.security.oauth.spi.OAuthPrincipalProcessor


            ClassLoader oauth = OAuthProviderType.class.getClassLoader();
            ClassLoader delegating = new DelegatingClassLoader(tccl, oauth);
            Class<OAuthProviderProcessor<T>> processorClass = (Class<OAuthProviderProcessor<T>>)delegating.loadClass(oauthProviderProcessorClass);
            OAuthProviderProcessor<T> oauthProviderProcessor = containerContext.getContainer().getComponentInstanceOfType(processorClass);

            OAuthPrincipalProcessor principalProcessor = null;
            Class<OAuthPrincipalProcessor> principalProcessorClass = (Class<OAuthPrincipalProcessor>) (principalProcessorClassName != null ? delegating
                    .loadClass(principalProcessorClassName) : DefaultPrincipalProcessor.class);
            principalProcessor = containerContext.getContainer().getComponentInstanceOfType(principalProcessorClass);
            if (principalProcessor == null) {
                principalProcessor = principalProcessorClass.newInstance();
View Full Code Here


        if (log.isTraceEnabled()) {
            log.trace("Not found portalUser with username " + principal.getUserName() + ". Redirecting to registration form");
        }

        //User gateInUser = OAuthUtils.convertOAuthPrincipalToGateInUser(principal);
        OAuthPrincipalProcessor principalProcessor = principal.getOauthProviderType().getOauthPrincipalProcessor();
        User gateInUser = principalProcessor.convertToGateInUser(principal);
        authenticationRegistry.setAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_PORTAL_USER, gateInUser);

        String registrationRedirectUrl = getRegistrationRedirectURL(httpRequest);
        registrationRedirectUrl = httpResponse.encodeRedirectURL(registrationRedirectUrl);
        httpResponse.sendRedirect(registrationRedirectUrl);
View Full Code Here

TOP

Related Classes of org.gatein.security.oauth.spi.OAuthPrincipalProcessor

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.