Examples of AuthConfigProvider


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

      String appContext = "testAppContext";
      factory = AuthConfigFactory.getFactory();
      //Register an AuthConfigProvider for all layers
      registrationID = factory.registerConfigProvider(allLayerProvider,
                              new HashMap(),layer,appContext, "This is a test provider");
      AuthConfigProvider acp = factory.getConfigProvider("TestLayer",appContext,
                      null);
      assertTrue("ACP instanceof AllLayerAuthConfigProvider",
                       acp instanceof AllLayerAuthConfigProvider);
      acp = factory.getConfigProvider(layer,appContext, null);
      assertTrue("ACP instanceof AllLayerAuthConfigProvider",
View Full Code Here

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

     
      String layer = SecurityConstants.SERVLET_LAYER;
      //Register an AuthConfigProvider for all appcontext in a layer
      factory.registerConfigProvider( allACProvider, new HashMap(),
                                  layer, null, "This is a test provider");
      AuthConfigProvider acp = factory.getConfigProvider(layer,"testAppContext", rl);
      String[] ids = factory.getRegistrationIDs(acp);
      String[] detachedIds = factory.detachListener(rl, layer, "testAppContext");
      checkStringArrayEquals(ids, detachedIds);
   }
View Full Code Here

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

        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.AuthConfigProvider

            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 {
                serverAuthConfig = authConfigProvider.getServerAuthConfig(MESSAGE_LAYER, appContext, callbackHandler);
            } catch (AuthException e) {
                //TODO log exception?  rethrow????
            }
        }
        if (serverAuthConfig != null) {
View Full Code Here

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

        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.AuthConfigProvider

            @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.AuthConfigProvider

            @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.AuthConfigProvider

            @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.AuthConfigProvider

            @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.AuthConfigProvider

            @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
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.