private static void setupSimpleSecurityProperties ( Hashtable < String , Object > env , String userDn , char [ ] pwd ) { // 'simple' = username + password env . put ( Context . SECURITY_AUTHENTICATION , "simple" ) ; // add the full user dn env . put ( Context . SECURITY_PRINCIPAL , userDn ) ; // set password env . put ( Context . SECURITY_CREDENTIALS , new String ( pwd ) ) ; }
Sets the environment properties needed for a simple username + password authenticated jndi connection .