net.adamcin.httpsig.api
Class Challenge

java.lang.Object
  extended by net.adamcin.httpsig.api.Challenge
All Implemented Interfaces:
Serializable

public final class Challenge
extends Object
implements Serializable

Representation of the "WWW-Authenticate: Signature ..." authentication challenge header sent by the server.

See Also:
Serialized Form

Constructor Summary
Challenge(String realm, List<String> headers, Collection<Algorithm> algorithms)
          Construct a Challenge instance
 
Method Summary
 boolean equals(Object o)
           
 List<Algorithm> getAlgorithms()
           
 String getAlgorithmsString()
           
 List<String> getHeaders()
           
 String getHeaderValue()
           
 String getRealm()
           
 int hashCode()
           
static Challenge parse(String header)
          Parse a WWW-Authenticate header value to create a Challenge
static List<Algorithm> parseAlgorithms(String algorithms)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Challenge

public Challenge(String realm,
                 List<String> headers,
                 Collection<Algorithm> algorithms)
Construct a Challenge instance

Parameters:
realm - the authentication realm
headers - the list of required headers
algorithms - the list of supported algorithms
Method Detail

getRealm

public String getRealm()

getHeaders

public List<String> getHeaders()

getAlgorithms

public List<Algorithm> getAlgorithms()

getHeaderValue

public String getHeaderValue()
Returns:
the constructed value of the WWW-Authenticate header

getAlgorithmsString

public String getAlgorithmsString()

toString

public String toString()
Overrides:
toString in class Object

parseAlgorithms

public static List<Algorithm> parseAlgorithms(String algorithms)

parse

public static Challenge parse(String header)
Parse a WWW-Authenticate header value to create a Challenge

Parameters:
header - WWW-Authenticate header value
Returns:
a Challenge header

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2013-2014. All Rights Reserved.