use of org.neo4j.server.security.auth.BasicAuthManager in project neo4j by neo4j.
the class BasicAuthenticationTest method setup.
@Before
public void setup() throws Throwable {
UserRepository userRepository = new InMemoryUserRepository();
PasswordPolicy policy = mock(PasswordPolicy.class);
BasicAuthManager manager = new BasicAuthManager(userRepository, policy, Clocks.systemClock(), userRepository);
authentication = new BasicAuthentication(manager, manager);
manager.newUser("bob", "secret", true);
manager.newUser("mike", "secret2", false);
}
use of org.neo4j.server.security.auth.BasicAuthManager in project neo4j by neo4j.
the class UserServiceTest method setupAuthManagerAndSubject.
protected void setupAuthManagerAndSubject() {
BasicAuthManager basicAuthManager = new BasicAuthManager(userRepository, passwordPolicy, mock(AuthenticationStrategy.class), new InMemoryUserRepository());
userManagerSupplier = basicAuthManager;
neo4jContext = new BasicSecurityContext(basicAuthManager, NEO4J_USER, AuthenticationResult.SUCCESS);
}
Aggregations