Class CredentialExtractors
java.lang.Object
org.forgerock.opendj.rest2ldap.authz.CredentialExtractors
Factory method for function extracting credentials from HTTP request
Headers.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringHTTP Header sent by the client with HTTP basic authentication. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.forgerock.util.Function<org.forgerock.http.protocol.Headers, org.forgerock.util.Pair<String, String>, org.forgerock.util.promise.NeverThrowsException> Creates a function which extracts the user's credentials from the standard HTTP Basic header.static org.forgerock.util.Function<org.forgerock.http.protocol.Headers, org.forgerock.util.Pair<String, String>, org.forgerock.util.promise.NeverThrowsException> newCustomHeaderExtractor(String customHeaderUsername, String customHeaderPassword) Creates a function which extracts the user's credentials from custom HTTP header in addition of the standard HTTP Basic one.
-
Field Details
-
HTTP_BASIC_AUTH_HEADER
HTTP Header sent by the client with HTTP basic authentication.- See Also:
-
-
Method Details
-
httpBasicExtractor
public static org.forgerock.util.Function<org.forgerock.http.protocol.Headers,org.forgerock.util.Pair<String, httpBasicExtractor()String>, org.forgerock.util.promise.NeverThrowsException> Creates a function which extracts the user's credentials from the standard HTTP Basic header.- Returns:
- the basic extractor singleton
-
newCustomHeaderExtractor
public static org.forgerock.util.Function<org.forgerock.http.protocol.Headers,org.forgerock.util.Pair<String, newCustomHeaderExtractorString>, org.forgerock.util.promise.NeverThrowsException> (String customHeaderUsername, String customHeaderPassword) Creates a function which extracts the user's credentials from custom HTTP header in addition of the standard HTTP Basic one.- Parameters:
customHeaderUsername- Name of the additional header to check for the user's namecustomHeaderPassword- Name of the additional header to check for the user's password- Returns:
- A new credentials extractors looking for custom header.
-