Class CredentialExtractors
- java.lang.Object
-
- org.forgerock.opendj.rest2ldap.authz.CredentialExtractors
-
public final class CredentialExtractors extends Object
Factory method for function extracting credentials from HTTP requestHeaders
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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 Detail
-
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.
-
-