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.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    HTTP Header sent by the client with HTTP basic authentication.
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • httpBasicExtractor

      public static org.forgerock.util.Function<org.forgerock.http.protocol.Headers,org.forgerock.util.Pair<String,String>,org.forgerock.util.promise.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 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.
      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.