net.adamcin.httpsig.api
Class Challenge
java.lang.Object
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
Challenge
public Challenge(String realm,
List<String> headers,
Collection<Algorithm> algorithms)
- Construct a
Challenge instance
- Parameters:
realm - the authentication realmheaders - the list of required headersalgorithms - the list of supported algorithms
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.