private void createAuthenticationProvider() { authProvider = (LDAPAuthenticationProvider) securityProvider.createAuthenticationProvider(config); } }
LDAPSecurityProvider provider = new LDAPSecurityProvider(getSecurityManager()); LDAPAuthenticationProvider authProvider = (LDAPAuthenticationProvider) provider .createAuthenticationProvider(ldapConfig); Authentication authentication = authProvider .authenticate(new UsernamePasswordAuthenticationToken( provider.destroy(null); info(new StringResourceModel(LDAPAuthProviderPanel.class.getSimpleName() + ".connectionSuccessful", null).getObject());
@Before public void setUp() throws Exception { tempFolder = File.createTempFile("ldap", "test"); tempFolder.delete(); tempFolder.mkdirs(); GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader(tempFolder); securityManager = new GeoServerSecurityManager(new GeoServerDataDirectory(resourceLoader)); securityProvider = new LDAPSecurityProvider(securityManager); createConfig(); config.setServerURL(ldapServerUrl + "/" + basePath); config.setGroupSearchBase("ou=Groups"); config.setGroupSearchFilter("member=cn={1}"); config.setUseTLS(false); authentication = new UsernamePasswordAuthenticationToken("admin", "admin"); authenticationOther = new UsernamePasswordAuthenticationToken("other", "other"); }
@Override public void setUp() throws Exception { tempFolder = File.createTempFile("ldap", "test"); tempFolder.delete(); tempFolder.mkdirs(); GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader( tempFolder); securityManager = new GeoServerSecurityManager( new GeoServerDataDirectory(resourceLoader)); securityProvider = new LDAPSecurityProvider(securityManager); config = new LDAPSecurityServiceConfig(); config.setServerURL(ldapServerUrl + "/" + basePath); config.setGroupSearchBase("ou=Groups"); config.setGroupSearchFilter("member=cn={1}"); config.setUseTLS(false); authentication = new UsernamePasswordAuthenticationToken("admin", "admin"); authenticationOther = new UsernamePasswordAuthenticationToken("other", "other"); }
private void createAuthenticationProvider() { authProvider = (LDAPAuthenticationProvider) securityProvider .createAuthenticationProvider(config); } }