Class CredentialExtractors
java.lang.Object
org.forgerock.opendj.hdap.authz.CredentialExtractors
Factory method for function extracting credentials from HTTP request
Headers.-
Method Summary
Modifier and TypeMethodDescriptionstatic Function<org.forgerock.http.protocol.Headers, Pair<String, String>, NeverThrowsException> Creates a function which extracts the user's credentials from the standard HTTP Basic header.static Function<org.forgerock.http.protocol.Headers, Pair<String, String>, 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.
-
Method Details
-
httpBasicExtractor
public static Function<org.forgerock.http.protocol.Headers, Pair<String,String>, NeverThrowsException> httpBasicExtractor()Creates a function which extracts the user's credentials from the standard HTTP Basic header.- Returns:
- the basic extractor singleton
-
newCustomHeaderExtractor
public static Function<org.forgerock.http.protocol.Headers, Pair<String,String>, 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.- 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.
-