Package org.geoserver.security.auth

Examples of org.geoserver.security.auth.GeoServerRootAuthenticationProvider.authenticate()


       
        /// Test root login after master password change
        Authentication auth = new UsernamePasswordAuthenticationToken("root", "geoserver3");
        GeoServerRootAuthenticationProvider authProvider = new GeoServerRootAuthenticationProvider();
        authProvider.setSecurityManager(getSecurityManager());
        auth = authProvider.authenticate(auth);
        assertTrue(auth.isAuthenticated());
       
        auth = new UsernamePasswordAuthenticationToken("root", "abcdefghijk");
        assertNull(authProvider.authenticate(auth));
        assertFalse(auth.isAuthenticated());
View Full Code Here


        authProvider.setSecurityManager(getSecurityManager());
        auth = authProvider.authenticate(auth);
        assertTrue(auth.isAuthenticated());
       
        auth = new UsernamePasswordAuthenticationToken("root", "abcdefghijk");
        assertNull(authProvider.authenticate(auth));
        assertFalse(auth.isAuthenticated());
    }

}
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.