Package org.gatein.security.oauth.spi

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


        UIFormInputSet businessInputSet = new UIFormInputSet("BusinessInfo");
        addInput(businessInputSet, UserProfile.BUSINESE_INFO_KEYS);
        businessInputSet.setRendered(false);
        addUIFormInput(businessInputSet);

        OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
        if (registry.isOAuthEnabled()) {
            UIFormInputSet socialInputSet = new UIFormInputSet("SocialNetworksInfo");
            addInput(socialInputSet, getSocialInfoKeys());
            socialInputSet.setRendered(false);
            addUIFormInput(socialInputSet);
        }
View Full Code Here


        langSelectBox.setOptions(lang);
    }

    private String[] getSocialInfoKeys() {
        List<String> result = new ArrayList<String>();
        OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
        for (OAuthProviderType oauthProvType : registry.getEnabledOAuthProviders()) {
            String oauthUsernameAttrName = oauthProvType.getUserNameAttrName();
            result.add(oauthUsernameAttrName);
        }
        return result.toArray(new String[] {});
    }
View Full Code Here

    @Override
    public boolean login() throws LoginException {
        try {
            ExoContainer container = getContainer();

            OAuthProviderTypeRegistry oauthRegistry = (OAuthProviderTypeRegistry)container.getComponentInstanceOfType(OAuthProviderTypeRegistry.class);
            if (!oauthRegistry.isOAuthEnabled()) {
                if (log.isTraceEnabled()) {
                    log.trace("OAuth is disabled. Ignoring this login module");
                }
                return false;
            }
View Full Code Here

        UIFormInputSet businessInputSet = new UIFormInputSet("BusinessInfo");
        addInput(businessInputSet, UserProfile.BUSINESE_INFO_KEYS);
        businessInputSet.setRendered(false);
        addUIFormInput(businessInputSet);

        OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
        if (registry.isOAuthEnabled()) {
            UIFormInputSet socialInputSet = new UIFormInputSet("SocialNetworksInfo");
            addInput(socialInputSet, getSocialInfoKeys());
            socialInputSet.setRendered(false);
            addUIFormInput(socialInputSet);
        }
View Full Code Here

        langSelectBox.setOptions(lang);
    }

    private String[] getSocialInfoKeys() {
        List<String> result = new ArrayList<String>();
        OAuthProviderTypeRegistry registry = getApplicationComponent(OAuthProviderTypeRegistry.class);
        for (OAuthProviderType oauthProvType : registry.getEnabledOAuthProviders()) {
            String oauthUsernameAttrName = oauthProvType.getUserNameAttrName();
            result.add(oauthUsernameAttrName);
        }
        return result.toArray(new String[] {});
    }
View Full Code Here

TOP

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

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.