public class HtdigestCredentials extends UsernamePasswordCredentials implements Credentials
HtdigestAuth
authentication providerConstructor and Description |
---|
HtdigestCredentials() |
HtdigestCredentials(JsonObject jsonObject) |
HtdigestCredentials(String username,
String password) |
getPassword, getUsername
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyHttpChallenge, applyHttpChallenge
public HtdigestCredentials()
public HtdigestCredentials(JsonObject jsonObject)
public String getAlgorithm()
public String getCnonce()
public String getMethod()
public String getNc()
public String getNonce()
public String getOpaque()
public String getQop()
public String getRealm()
public String getResponse()
public String getUri()
public HtdigestCredentials setAlgorithm(String algorithm)
public HtdigestCredentials setCnonce(String cnonce)
public HtdigestCredentials setMethod(String method)
public HtdigestCredentials setNc(String nc)
public HtdigestCredentials setNonce(String nonce)
public HtdigestCredentials setOpaque(String opaque)
public HtdigestCredentials setQop(String qop)
public HtdigestCredentials setRealm(String realm)
public HtdigestCredentials setResponse(String response)
public HtdigestCredentials setUri(String uri)
public HtdigestCredentials setUsername(String username)
setUsername
in class UsernamePasswordCredentials
public HtdigestCredentials setPassword(String password)
setPassword
in class UsernamePasswordCredentials
public <V> void checkValid(V arg) throws CredentialValidationException
Credentials
checkValid
in interface Credentials
checkValid
in class UsernamePasswordCredentials
V
- the generic type of the argumentarg
- optional argument or null.CredentialValidationException
- when the validation failspublic JsonObject toJson()
Credentials
toJson
in interface Credentials
toJson
in class UsernamePasswordCredentials
public String toString()
toString
in class UsernamePasswordCredentials
public HtdigestCredentials applyHttpChallenge(String challenge, HttpMethod method, String uri, Integer nc, String cnonce) throws CredentialValidationException
Credentials
applyHttpChallenge
in interface Credentials
applyHttpChallenge
in class UsernamePasswordCredentials
challenge
- the challenge is the WWW-Authenticate
header response from a 401 request.
Null challenges are allowed, and in this case, no verification will be performed, however it is
up to the implementation to permit this.method
- The http method this response is responding.uri
- The http uri this response is responding.nc
- The client internal counter (optional).cnonce
- The client internal nonce (optional).CredentialValidationException
- if the challenge cannot be applicable.public String toHttpAuthorization()
Credentials
Credentials.applyHttpChallenge(String, HttpMethod, String, Integer, String)
has
been prior executed. For some Authentication schemes, this isn't a requirement but doing so ensures that the
object is on the right state.toHttpAuthorization
in interface Credentials
toHttpAuthorization
in class UsernamePasswordCredentials
Copyright © 2023 Eclipse. All rights reserved.