public LdapSecurityRealmBuilder build() { assertNotBuilt(); built = true; OtpCredentialLoader ocl = new OtpCredentialLoader(otpAlgorithmAttribute, otpHashAttribute, otpSeedAttribute, otpSequenceAttribute); LdapSecurityRealmBuilder.this.addCredentialLoader(ocl); LdapSecurityRealmBuilder.this.addCredentialPersister(ocl); return LdapSecurityRealmBuilder.this; }
public LdapSecurityRealmBuilder build() { assertNotBuilt(); built = true; UserPasswordCredentialLoader upcl = new UserPasswordCredentialLoader(userPasswordAttribute); LdapSecurityRealmBuilder.this.addCredentialLoader(upcl); if (enablePersistence) LdapSecurityRealmBuilder.this.addCredentialPersister(upcl); if (enableVerification) LdapSecurityRealmBuilder.this.addEvidenceVerifier(upcl.toEvidenceVerifier()); return LdapSecurityRealmBuilder.this; }
private ClassLoader setSocketFactory() { if (socketFactory != null) { ThreadLocalSSLSocketFactory.set(socketFactory); return setClassLoaderTo(getSocketFactoryClassLoader()); } return null; }
public LdapSecurityRealmBuilder addDirectEvidenceVerification(boolean allowBlankPassword) { assertNotBuilt(); return addEvidenceVerifier(new DirectEvidenceVerifier(allowBlankPassword)); }
public LdapSecurityRealmBuilder build() { assertNotBuilt(); built = true; if (filterName == null) filterName = String.format("(%s={0})", nameAttribute); return LdapSecurityRealmBuilder.this.setIdentityMapping(new IdentityMapping( searchDn, searchRecursive, searchTimeLimit, nameAttribute, attributes, newIdentityParent, newIdentityAttributes, filterName, iteratorFilter)); }
public LdapSecurityRealmBuilder build() { assertNotBuilt(); Assert.checkNotEmptyParam("certificateVerifiers", certificateVerifiers); built = true; addEvidenceVerifier(new X509EvidenceVerifier(certificateVerifiers)); return LdapSecurityRealmBuilder.this; }
public OtpCredentialLoaderBuilder otpCredentialLoader() { assertNotBuilt(); return new OtpCredentialLoaderBuilder(); }
public UserPasswordCredentialLoaderBuilder userPasswordCredentialLoader() { assertNotBuilt(); return new UserPasswordCredentialLoaderBuilder(); }
public IdentityMappingBuilder identityMapping() { assertNotBuilt(); return new IdentityMappingBuilder(); }
public X509EvidenceVerifierBuilder x509EvidenceVerifier() { assertNotBuilt(); return new X509EvidenceVerifierBuilder(); }
private void unsetSocketFactory(ClassLoader previous) { if (socketFactory != null) { ThreadLocalSSLSocketFactory.unset(); setClassLoaderTo(previous); } }
/** * Sets the time limit of LDAP search in milliseconds. * * @param limit the limit in milliseconds. Defaults to {@value #DEFAULT_SEARCH_TIME_LIMIT} milliseconds. * @return this builder */ public IdentityMappingBuilder setSearchTimeLimit(int limit) { assertNotBuilt(); this.searchTimeLimit = limit; return this; }
public OtpCredentialLoaderBuilder setOtpHashAttribute(final String otpHashAttribute) { assertNotBuilt(); this.otpHashAttribute = otpHashAttribute; return this; }
/** * Set the initial context factory class name. * * @param initialContextFactory the class name * @return this builder */ public SimpleDirContextFactoryBuilder setInitialContextFactory(final String initialContextFactory) { assertNotBuilt(); this.initialContextFactory = initialContextFactory; return this; }
/** * Set the name of the attribute within the LDAP entry that should be queries to load the credential. * * @param userPasswordAttribute the name of the attribute within the LDAP entry that should be queries to load the credential. * @return the {@link UserPasswordCredentialLoaderBuilder} to allow chaining of calls. */ public UserPasswordCredentialLoaderBuilder setUserPasswordAttribute(final String userPasswordAttribute) { assertNotBuilt(); this.userPasswordAttribute = userPasswordAttribute; return this; }
/** * Set the directory context supplier. * * @param dirContextSupplier the directory context supplier * @return this builder */ public LdapSecurityRealmBuilder setDirContextSupplier(final ExceptionSupplier<DirContext, NamingException> dirContextSupplier) { assertNotBuilt(); this.dirContextSupplier = dirContextSupplier; return this; }
public IdentityMappingBuilder setIteratorFilter(String iteratorFilter) { assertNotBuilt(); this.iteratorFilter = iteratorFilter; return this; }
public OtpCredentialLoaderBuilder setOtpSequenceAttribute(final String otpSequenceAttribute) { assertNotBuilt(); this.otpSequenceAttribute = otpSequenceAttribute; return this; }
/** * Set the provider URL. * * @param providerUrl the provider URL * @return this builder */ public SimpleDirContextFactoryBuilder setProviderUrl(final String providerUrl) { assertNotBuilt(); this.providerUrl = providerUrl; return this; }
/** * By default if we can obtain a credential we support verification against it, this disables it. * * @return the {@link UserPasswordCredentialLoaderBuilder} to allow chaining of calls. */ public UserPasswordCredentialLoaderBuilder disableVerification() { assertNotBuilt(); enableVerification = false; return this; }