Package org.apache.ace.authentication.processor.basicauth

Examples of org.apache.ace.authentication.processor.basicauth.BasicHttpAuthenticationProcessor.authenticate()


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

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

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