Class Challenge

java.lang.Object
com.inrupt.client.auth.Challenge

public final class Challenge extends Object
Part of the HTTP Challenge and Response authentication framework, this class represents a challenge object as represented in a WWW-Authenticate Response Header.
See Also:
  • Method Details

    • of

      public static Challenge of(String scheme)
      Create a new Challenge object with a specific authentication scheme and no parameters.
      Parameters:
      scheme - the authentication scheme
      Returns:
      the challenge
    • of

      public static Challenge of(String scheme, Map<String,String> parameters)
      Create a new Challenge object with a specific authentication scheme and parameters.
      Parameters:
      scheme - the authentication scheme
      parameters - the authentication parameters
      Returns:
      the challenge
    • getScheme

      public String getScheme()
      Get the authentication scheme for this challenge.
      Returns:
      the scheme name
    • getParameter

      public String getParameter(String parameter)
      Get the value of the given parameter.
      Parameters:
      parameter - the parameter name
      Returns:
      the parameter value, may be null
    • getParameters

      public Map<String,String> getParameters()
      Get all the parameters for this challenge.
      Returns:
      the complete collection of parameters
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object