Package javax.security.auth.message.config

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


     * 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

     * 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

                                            @ParamAttribute(name = "allowLazyAuthentication") boolean allowLazyAuthentication,
                                            @ParamReference(name = "ConfigurationFactory") ConfigurationFactory configurationFactory
    ) throws AuthException {
        String appContext1 = 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

        }
        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

      AuthStatus status = AuthStatus.FAILURE;
     
      try
      {
         String contextID = PolicyContext.getContextID();
         AuthConfigFactory factory = AuthConfigFactory.getFactory();
         AuthConfigProvider provider = factory.getConfigProvider(layer,contextID,null);
         ServerAuthConfig serverConfig = provider.getServerAuthConfig(layer,contextID,
                  new AppCallbackHandler("DUMMY","DUMMY".toCharArray()))
         ServerAuthContext sctx = serverConfig.getAuthContext(contextID,
               new Subject(), new HashMap());
         if(clientSubject == null)
View Full Code Here

      AuthStatus status = AuthStatus.FAILURE;
     
      try
      {
         String contextID = PolicyContext.getContextID();
         AuthConfigFactory factory = AuthConfigFactory.getFactory();
         AuthConfigProvider provider = factory.getConfigProvider(layer,contextID,null);
         ServerAuthConfig serverConfig = provider.getServerAuthConfig(layer,contextID,
                  new AppCallbackHandler("DUMMY","DUMMY".toCharArray()))
         ServerAuthContext sctx = serverConfig.getAuthContext(contextID,
               new Subject(), new HashMap());
         if(clientSubject == null)
View Full Code Here

        }
        IdentityService identityService = new GeronimoIdentityService(defaultSubject);
        UserIdentity unauthenticatedIdentity = identityService.newUserIdentity(defaultSubject);
        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;
        CallbackHandler callbackHandler = null;
        if (authConfigProvider != null) {
            callbackHandler = new JaspicCallbackHandler(loginService);
            try {
View Full Code Here

        }
        AccessControlContext defaultAcc = ContextManager.registerSubjectShort(defaultSubject, null);
        JettyIdentityService identityService = new JettyIdentityService(defaultAcc, defaultSubject, runAsSource);
        GeronimoLoginService loginService = new GeronimoLoginService(configurationFactory, identityService);
        authConfigProperties.put(POLICY_CONTEXT_ID_KEY, policyContextID);
        AuthConfigFactory authConfigFactory = AuthConfigFactory.getFactory();
        RegistrationListener listener = new RegistrationListener() {

            public void notify(String layer, String appContext) {
            }
        };
        AuthConfigProvider authConfigProvider = authConfigFactory.getConfigProvider(messageLayer, appContext, listener);
        CallbackHandler callbackHandler = new JaspicCallbackHandler(loginService);
        ServerAuthConfig serverAuthConfig = authConfigProvider.getServerAuthConfig(messageLayer, appContext, callbackHandler);
        //TODO appContext is supposed to be server-name<space>context-root
        Authenticator authenticator = new GeronimoJaspiAuthenticator(serverAuthConfig, authConfigProperties, callbackHandler, serviceSubject, allowLazyAuthentication, identityService);
        //login service functionality is already inside the servletCallbackHandler
View Full Code Here

         {
            server.invoke(oname,"registerSecurityDomain",
                  new Object[]{securityDomain,contextId},
                  new String[] {"java.lang.String", "java.lang.String"} );
         }
         AuthConfigFactory factory = AuthConfigFactory.getFactory();
         AuthConfigProvider acp = factory.getConfigProvider(SecurityConstants.SERVLET_LAYER,
                                            contextId,null);
         if(acp == null)
         {
            acp = new JBossAuthConfigProvider(null);
        
View Full Code Here

TOP

Related Classes of javax.security.auth.message.config.AuthConfigFactory

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.