Module io.inverno.mod.security.http
Class DigestCredentials
java.lang.Object
io.inverno.mod.security.http.digest.DigestCredentials
- All Implemented Interfaces:
Credentials
,PrincipalCredentials
HTTP Digest specific credentials as defined by RFC 7616 Section 3.4.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the client nonce.Returns the message digest.Returns the HTTP method.getNc()
Returns the nonce count.getNonce()
Returns the server nonce.long
Returns the server nonce expire timestamp.Returns the server nonce hash.getQop()
Returns the quality of protection.getRealm()
Returns the realm.Returns the digest responsegetUri()
Returns the URI.Returns the unique username associated to the entity.boolean
Returns the user hash.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.security.authentication.Credentials
isLocked
-
Constructor Details
-
DigestCredentials
public DigestCredentials(String method, String uri, String realm, String username, boolean userhash, String algorithm, String qop, String nc, String cnonce, String nonce, String response) throws MalformedCredentialsException Creates digest credentials.
- Parameters:
method
- the HTTP methoduri
- the URIrealm
- the realmusername
- the usernameuserhash
- the user hashalgorithm
- the algorithmqop
- the quality of protectionnc
- the nonce countcnonce
- the client noncenonce
- the server nonceresponse
- the digest response- Throws:
MalformedCredentialsException
- if specified parameters and therefore credentials are incorrect
-
-
Method Details
-
getDigest
Returns the message digest.
- Returns:
- the message digest
-
getResponse
Returns the digest response
- Returns:
- the digest response
-
getUsername
Description copied from interface:PrincipalCredentials
Returns the unique username associated to the entity.
- Specified by:
getUsername
in interfacePrincipalCredentials
- Returns:
- a username
-
getRealm
Returns the realm.
- Returns:
- the realm
-
isUserhash
public boolean isUserhash()Returns the user hash.
- Returns:
- the user hash
-
getMethod
Returns the HTTP method.
- Returns:
- the HTTP method
-
getUri
Returns the URI.
- Returns:
- the URI
-
getQop
Returns the quality of protection.
- Returns:
- the qop
-
getCnonce
Returns the client nonce.
- Returns:
- the client nonce
-
getNc
Returns the nonce count.
- Returns:
- the nonce count
-
getNonce
Returns the server nonce.
- Returns:
- the server nonce
-
getNonceExpire
public long getNonceExpire()Returns the server nonce expire timestamp.
- Returns:
- the server nonce expire timestamp
-
getNonceHash
Returns the server nonce hash.
- Returns:
- the server nonce hash
-