Package javax.security.auth.spi

Examples of javax.security.auth.spi.LoginModule.initialize()


            throw new WikiSecurityException(e.getMessage(), e );
        }

        // Initialize the LoginModule
        Subject subject = new Subject();
        loginModule.initialize( subject, handler, EMPTY_MAP, options );

        // Try to log in:
        boolean loginSucceeded = false;
        boolean commitSucceeded = false;
        try
View Full Code Here


         ClassLoader tcl = SecurityActions.getContextClassLoader();
         try
         {
            Class clazz = tcl.loadClass(loginModuleName);
            LoginModule lm = (LoginModule) clazz.newInstance();
            lm.initialize(clientSubject, callbackHandler, new HashMap(), options);
            lm.login();
            lm.commit();
         }
         catch (Exception e)
         {
View Full Code Here

        checkContext(session, loginModuleIndex);
        LoginModule module = session.getLoginModule(loginModuleIndex);

        session.getHandler().setExploring();
        try {
            module.initialize(session.getSubject(), session.getHandler(), new HashMap(), session.getOptions(loginModuleIndex));
        } catch (Exception e) {
            log.error("Failed to initialize module", e);
        }
        try {
            module.login();
View Full Code Here

         ClassLoader tcl = SecurityActions.getContextClassLoader();
         try
         {
            Class clazz = tcl.loadClass(loginModuleName);
            LoginModule lm = (LoginModule) clazz.newInstance();
            lm.initialize(clientSubject, callbackHandler, new HashMap(), options);
            lm.login();
            lm.commit();
         }
         catch (Exception e)
         {
View Full Code Here

                            LoginModule module = (LoginModule) AccessController.doPrivileged(new java.security.PrivilegedExceptionAction() {
                                public Object run() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
                                    return Class.forName(finalClass, true, classLoader).newInstance();
                                }
                            });
                            module.initialize(subject, callback, new HashMap(), entry.getOptions());
                            modules[i] = new LoginModuleConfiguration(module, LoginModuleControlFlag.getInstance(entry.getControlFlag()));

                        }
                        lm = allocateLoginModuleCacheObject(securityRealm.getMaxLoginModuleAge());
                        lm.setRealmName(realmName);
View Full Code Here

                });

                HashMap map = new HashMap(entry.getOptions());
                map.put(LOGIN_SERVICE, remoteLoginService);

                wrapper.initialize(subject, callbackHandler, sharedState, map);
                modules[i] = new LoginModuleConfiguration(wrapper, entry.getControlFlag());
            }

            if (debug) {
                System.out.print("[GeronimoLoginModule] Debug is  " + debug + " uri " + uri + " realm " + realm + "\n");
View Full Code Here

                                return Class.forName(finalClass, true, classLoader).newInstance();
                            }
                        });
                        Subject subject = new Subject();
                        CallbackProxy callback = new CallbackProxy();
                        module.initialize(subject, callback, new HashMap(), entry.getOptions());

                        lm = allocateLoginModuleCacheObject(securityRealm.getMaxLoginModuleAge());
                        lm.setRealmName(realmName);
                        lm.setLoginModule(module);
                        lm.setSubject(subject);
View Full Code Here

         ClassLoader tcl = SecurityActions.getContextClassloader();
         try
         {
            Class clazz = tcl.loadClass(loginModuleName);
            LoginModule lm = (LoginModule) clazz.newInstance();
            lm.initialize(clientSubject, callbackHandler, new HashMap(), options);
            lm.login();
            lm.commit();
         }
         catch (Exception e)
         {
View Full Code Here

            throw new WikiSecurityException(e.getMessage(), e );
        }

        // Initialize the LoginModule
        Subject subject = new Subject();
        loginModule.initialize( subject, handler, EMPTY_MAP, options );

        // Try to log in:
        boolean loginSucceeded = false;
        boolean commitSucceeded = false;
        try
View Full Code Here

        checkContext(session, loginModuleIndex);
        LoginModule module = session.getLoginModule(loginModuleIndex);

        session.getHandler().setExploring();
        try {
            module.initialize(session.getSubject(), session.getHandler(), new HashMap(), session.getOptions(loginModuleIndex));
        } catch (Exception e) {
            System.err.println("Failed to initialize module");
            e.printStackTrace();
        }
        try {
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.