Package org.apache.harmony.auth.module

Examples of org.apache.harmony.auth.module.LdapLoginModule.logout()


        }
        catch(LoginException e){
            fail("Login should be failed");
        }
        finally{
            module.logout();
        }
       
        options.remove("tryFirstPass");
        options.put("clearPass", "true");
        status.put("javax.security.auth.login.name", "leo");
View Full Code Here


            assertNull("javax.security.auth.login.password in shared state should be null when clearPass switch on",status.get("javax.security.auth.login.password"));
        } catch (LoginException e) {
            fail("Login shouldn't fail");
        }
        finally{
            module.logout();
        }
       
        status = new HashMap<String,Object>();
        options.remove("clearPass");
        options.put("storePass", "true");
View Full Code Here

        } catch (LoginException e) {
            assertNull("javax.security.auth.login.name in shared state should be null when login failed",status.get("javax.security.auth.login.name"));
            assertNull("javax.security.auth.login.password in shared state should be null when login failed",status.get("javax.security.auth.login.password"));
        }
        finally{
            module.logout();
        }
       
        module.initialize(subject, new MockCallbackHandler(), status, options);
        try {
            module.login();
View Full Code Here

            module.commit();       
        } catch (LoginException e) {
            fail("Login failed");
        }
        finally{
            module.logout();
        }
        assertNotNull("javax.security.auth.login.name should be stored in shared state when storePass switch on",status.get("javax.security.auth.login.name"));
        assertNotNull("javax.security.auth.login.password should be stored in shared state when storePass switch on",status.get("javax.security.auth.login.password"));
       
        status.put("javax.security.auth.login.name", "tester");
View Full Code Here

            module.commit();       
        } catch (LoginException e) {
            fail("Login failed");
        }
        finally{
            module.logout();
        }
        assertEquals("Should't override the username value in sharedState",status.get("javax.security.auth.login.name"),"tester");
        assertEquals("Should't override the password value in sharedState",status.get("javax.security.auth.login.password"),"testerPass");    
    }
   
View Full Code Here

            fail("Login shouldn't fail");
        }
        Set<Principal> principals = subject.getPrincipals();
        assertFalse("Should get at least one principal", principals.isEmpty());
        try {
            assertTrue("Should be true", module.logout());
        } catch (LoginException e) {
            fail("Logout failed");
        }
        principals = subject.getPrincipals();
        assertTrue("Principals should be cleared", principals.isEmpty());
View Full Code Here

        }
        catch(LoginException e){
            fail("Login failed");
        }
        finally{
            module.logout();
        }
       
        options.put("debug", "true");
        options.put("useFirstPass", "true");
        HashMap<String, Object> status = new HashMap<String,Object>();
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.