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 request Headers.
  • 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 name
      customHeaderPassword - Name of the additional header to check for the user's password
      Returns:
      A new credentials extractors looking for custom header.