Package org.forgerock.opendj.hdap.authz
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 AuthenticationStrategy
newSaslScramStrategy
(LdapClient ldapClient, ScramMechanism scramMechanism, Schema schema, String authcIdTemplate) Creates anAuthenticationStrategy
performing authentication against an LDAP server using a SCRAM SASL bind request.static AuthenticationStrategy
newSimpleBindStrategy
(LdapClient ldapClient, Function<String, Dn> dnMapper) Creates anAuthenticationStrategy
performing simple BIND authentication against an LDAP server.
-
Method Details
-
newSimpleBindStrategy
public static AuthenticationStrategy newSimpleBindStrategy(LdapClient ldapClient, Function<String, Dn> dnMapper) Creates anAuthenticationStrategy
performing simple BIND authentication against an LDAP server.- Parameters:
ldapClient
- AnLdapClient
to 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 anAuthenticationStrategy
performing authentication against an LDAP server using a SCRAM SASL bind request.- Parameters:
ldapClient
-LdapClient
to 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
-