Package org.apache.ace.authentication.processor.password

Examples of org.apache.ace.authentication.processor.password.PasswordAuthenticationProcessor.authenticate()


        when(user.getName()).thenReturn("bob");
        when(user.hasCredential(eq(keyPassword), eq(hashedPw))).thenReturn(Boolean.TRUE);

        when(m_userAdmin.getUser(eq(keyUsername), eq("bob"))).thenReturn(user);

        User result = processor.authenticate(m_userAdmin, "bob", "secret");
        assert result != null : "Expected a valid user to be returned!";
       
        assert "bob".equals(user.getName()) : "Expected bob to be returned!";
    }
   
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.