@Test public void testSetupEnvironment() { Hashtable env = new Hashtable(); tested.setupEnvironment(env, "cn=John Doe", "pw"); assertThat(env.get(Context.SECURITY_AUTHENTICATION)).isEqualTo("simple"); assertThat(env.get(Context.SECURITY_PRINCIPAL)).isEqualTo("cn=John Doe"); assertThat(env.get(Context.SECURITY_CREDENTIALS)).isEqualTo("pw"); }
public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) { env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION); env.put(Context.SECURITY_PRINCIPAL, userDn); env.put(Context.SECURITY_CREDENTIALS, password); }
SimpleDirContextAuthenticationStrategy implements DirContextAuthenticationStrategy { public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) { env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION); env.put(Context.SECURITY_PRINCIPAL, userDn); env.put(Context.SECURITY_CREDENTIALS, password); } }
SimpleDirContextAuthenticationStrategy implements DirContextAuthenticationStrategy { public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) { env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION); env.put(Context.SECURITY_PRINCIPAL, userDn); env.put(Context.SECURITY_CREDENTIALS, password); }  }
SimpleDirContextAuthenticationStrategy implements DirContextAuthenticationStrategy { public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) { env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION); env.put(Context.SECURITY_PRINCIPAL, userDn); env.put(Context.SECURITY_CREDENTIALS, password); }  void setupEnvironment(Hashtable<String, Object> env, String userDn, String password); DirContext processContextAfterCreation(DirContext ctx, String userDn, String password); }
SimpleDirContextAuthenticationStrategy implements DirContextAuthenticationStrategy { public void setupEnvironment(Hashtable<String, Object> env, String userDn, String password) { env.put(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION); env.put(Context.SECURITY_PRINCIPAL, userDn); env.put(Context.SECURITY_CREDENTIALS, password); }  void setupEnvironment(Hashtable<String, Object> env, String userDn, String password); DirContext processContextAfterCreation(DirContext ctx, String userDn, String password);  }