| Constructor and Description | 
|---|
Challenge(String schemeName,
         String token68)
Constructs a challenge with  token68 string 
 | 
Challenge(String schemeName,
         String realm,
         Map<String,String> params)
Constructs a challenge with an optional realm and auth parameters. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
Map<String,String> | 
getParams()
Returns any auth parameters that form part of this challenge
 excluding the realm. 
 | 
String | 
getRealm()
Returns the authentication realm if defined. 
 | 
String | 
getRequiredParameter(String key)
Utility method giving a non-empty value for a named parameter
 of this challenge. 
 | 
URL | 
getRequiredParameterUrl(String key)
Utility method giving a non-null URL value
 for a named parameter of this challenge. 
 | 
String | 
getRequiredRealm()
Utility method giving a non-empty realm for this challenge. 
 | 
String | 
getSchemeName()
Returns the authentication scheme name. 
 | 
String | 
getToken68()
Returns the token68 value if defined. 
 | 
int | 
hashCode()  | 
static void | 
main(String[] args)
Will parse a WWW-Authenticate string on the command line and
 print out the parsed challenges. 
 | 
static List<Challenge> | 
parseChallenges(String challengeTxt)
Parses the content of a WWW-Authenticate header as a sequence
 of RFC7235 challenges. 
 | 
String | 
toString()  | 
public Challenge(String schemeName, String realm, Map<String,String> params)
schemeName - scheme name, case insensitiverealm - specified realm value, or nullparams - additional parameters (excluding realm);
                 keys are case insensitive and will be mapped to lowerpublic String getSchemeName()
public String getRealm()
public String getToken68()
public Map<String,String> getParams()
public String getRequiredRealm() throws BadChallengeException
BadChallengeException - if there is no realmpublic String getRequiredParameter(String key) throws BadChallengeException
key - parameter name, case-insensitivekeyBadChallengeException - if no value is specified
                                 for keypublic URL getRequiredParameterUrl(String key) throws BadChallengeException
key - parameter name, case-insensitivekeyBadChallengeException - if no URL value is specified
                                 for keypublic static List<Challenge> parseChallenges(String challengeTxt)
challengeTxt - text as value of WWW-Authenticate headerpublic static void main(String[] args)
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.