Examples of AuthConfigFactory


Examples of javax.security.auth.message.config.AuthConfigFactory

                                            @ParamAttribute(name = "allowLazyAuthentication") boolean allowLazyAuthentication,
                                            @ParamReference(name = "ConfigurationFactory") ConfigurationFactory configurationFactory
    ) throws AuthException {
        this.appContext = appContext;
        this.allowLazyAuthentication = allowLazyAuthentication;
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        RegistrationListener listener = new RegistrationListener() {

            public void notify(String layer, String appContext) {
            }
        };
        AuthConfigProvider authConfigProvider = authConfigFactory.getConfigProvider(messageLayer, appContext, listener);
        this.loginService = new JAASLoginService(configurationFactory, null);
        servletCallbackHandler = new ServletCallbackHandler(loginService);
        serverAuthConfig = authConfigProvider.getServerAuthConfig(messageLayer, appContext, servletCallbackHandler);
        //TODO appContext is supposed to be server-name<space>context-root
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

        }
        IdentityService identityService = new GeronimoIdentityService(defaultSubject);
        UserIdentity unauthenticatedIdentity = identityService.newUserIdentity(defaultSubject, null, null);
        LoginService loginService = new GeronimoLoginService(configurationFactory, identityService);
        Authenticator authenticator;
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        RegistrationListener listener = new RegistrationListener() {

            public void notify(String layer, String appContext) {
            }
        };
        //?? TODO is context.getPath() the context root?
        String appContext = "server " + geronimoContext.getPath();
        AuthConfigProvider authConfigProvider = authConfigFactory.getConfigProvider(MESSAGE_LAYER, appContext, listener);
        ServerAuthConfig serverAuthConfig = null;
        JaspicCallbackHandler callbackHandler = null;
        if (authConfigProvider != null) {
            callbackHandler = new JaspicCallbackHandler(loginService);
            try {
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

        ClassLoaderLookup classLoaderLookup = new ConstantClassLoaderLookup(classLoader);

        String messageLayer = null;
        String appContext = null;

        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        ConfigProviderType configProviderType = JaspiXmlUtil.loadConfigProvider(new StringReader(config));
        AuthConfigProvider authConfigProvider = JaspiUtil.wraptAuthConfigProvider(configProviderType, classLoaderLookup);
        registrationID = authConfigFactory.registerConfigProvider(authConfigProvider, messageLayer, appContext, null);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

     * Stops the target.  This informs the GBean that it is about to transition to the stopped state.
     *
     * @throws Exception if the target failed to stop; this will cause a transition to the failed state
     */
    public void doStop() throws Exception {
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        authConfigFactory.removeRegistration(registrationID);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

    public ServerAuthContextGBean(
            @ParamAttribute(name = "config") String config,
            @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader) throws AuthException, JAXBException, IOException, ParserConfigurationException, SAXException, XMLStreamException {
        ClassLoaderLookup classLoaderLookup = new ConstantClassLoaderLookup(classLoader);

        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        ServerAuthContextType serverAuthContextType = JaspiXmlUtil.loadServerAuthContext(new StringReader(config));
        AuthConfigProvider authConfigProvider = JaspiUtil.wrapServerAuthContext(serverAuthContextType, true, classLoaderLookup);
        registrationID = authConfigFactory.registerConfigProvider(authConfigProvider, serverAuthContextType.getMessageLayer(), serverAuthContextType.getAppContext(), null);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

     * Stops the target.  This informs the GBean that it is about to transition to the stopped state.
     *
     * @throws Exception if the target failed to stop; this will cause a transition to the failed state
     */
    public void doStop() throws Exception {
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        authConfigFactory.removeRegistration(registrationID);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

            @ParamAttribute(name = "authenticationID") String authenticationID,
            @ParamAttribute(name = "config") String config,
            @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader) throws AuthException, JAXBException, IOException, ParserConfigurationException, SAXException, XMLStreamException {
        ClassLoaderLookup classLoaderLookup = new ConstantClassLoaderLookup(classLoader);

        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        AuthModuleType<ClientAuthModule> clientAuthModuleType = JaspiXmlUtil.loadClientAuthModule(new StringReader(config));
        AuthConfigProvider authConfigProvider = JaspiUtil.wrapClientAuthModule(messageLayer, appContext, authenticationID, clientAuthModuleType, true, classLoaderLookup);
        registrationID = authConfigFactory.registerConfigProvider(authConfigProvider, messageLayer, appContext, null);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

     * Stops the target.  This informs the GBean that it is about to transition to the stopped state.
     *
     * @throws Exception if the target failed to stop; this will cause a transition to the failed state
     */
    public void doStop() throws Exception {
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        authConfigFactory.removeRegistration(registrationID);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

    public ClientAuthContextGBean(
            @ParamAttribute(name = "config") String config,
            @ParamSpecial(type = SpecialAttributeType.classLoader) ClassLoader classLoader) throws AuthException, JAXBException, IOException, ParserConfigurationException, SAXException, XMLStreamException {
        ClassLoaderLookup classLoaderLookup = new ConstantClassLoaderLookup(classLoader);

        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        ClientAuthContextType clientAuthContextType = JaspiXmlUtil.loadClientAuthContext(new StringReader(config));
        AuthConfigProvider authConfigProvider = JaspiUtil.wrapClientAuthContext(clientAuthContextType, true, classLoaderLookup);
        registrationID = authConfigFactory.registerConfigProvider(authConfigProvider, clientAuthContextType.getMessageLayer(), clientAuthContextType.getAppContext(), null);
    }
View Full Code Here

Examples of javax.security.auth.message.config.AuthConfigFactory

     * Stops the target.  This informs the GBean that it is about to transition to the stopped state.
     *
     * @throws Exception if the target failed to stop; this will cause a transition to the failed state
     */
    public void doStop() throws Exception {
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        authConfigFactory.removeRegistration(registrationID);
    }
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.