Class AuthenticationStrategies
java.lang.Object
org.forgerock.opendj.hdap.authz.AuthenticationStrategies
Factory methods of
AuthenticationStrategy allowing to perform authentication against LDAP server through
different method.-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStrategynewSaslScramStrategy(LdapClient ldapClient, ScramMechanism scramMechanism, Schema schema, String authcIdTemplate) Creates anAuthenticationStrategyperforming authentication against an LDAP server using a SCRAM SASL bind request.static AuthenticationStrategynewSimpleBindStrategy(LdapClient ldapClient, Function<String, Dn> dnMapper) Creates anAuthenticationStrategyperforming simple BIND authentication against an LDAP server.
-
Method Details
-
newSimpleBindStrategy
public static AuthenticationStrategy newSimpleBindStrategy(LdapClient ldapClient, Function<String, Dn> dnMapper) Creates anAuthenticationStrategyperforming simple BIND authentication against an LDAP server.- Parameters:
ldapClient- AnLdapClientto the LDAP server used to perform the bind operation.dnMapper- A mapper that converts a String into a DN.- Returns:
- a new simple bind
AuthenticationStrategy - Throws:
NullPointerException- If a parameter is null
-
newSaslScramStrategy
public static AuthenticationStrategy newSaslScramStrategy(LdapClient ldapClient, ScramMechanism scramMechanism, Schema schema, String authcIdTemplate) Creates anAuthenticationStrategyperforming authentication against an LDAP server using a SCRAM SASL bind request.- Parameters:
ldapClient-LdapClientto the LDAP server to authenticate with.scramMechanism- The SCRAM mechanism which should be used.schema- Schema used to perform DN validation.authcIdTemplate- Authentication identity template containing a single %s which will be replaced by the authenticating user's name. (i.e: (u:%s)- Returns:
- a new SASL SCRAM bind
AuthenticationStrategy - Throws:
NullPointerException- If a parameter is null
-