public class DigestCredentials extends TokenCredentials
This credentials is retrieved from a HTTP request.
A user profile can be attached with the credentials if it has been created by a
Authenticator
.
In that case, the AuthenticatorProfileCreator
must be used to retrieve the attached user profile.
Constructor and Description |
---|
DigestCredentials(String token,
String httpMethod,
String clientName,
String username,
String realm,
String nonce,
String uri,
String cnonce,
String nc,
String qop)
the token represents the client response attribute value in digest authorization header
|
Modifier and Type | Method and Description |
---|---|
String |
calculateServerDigest(boolean passwordAlreadyEncoded,
String password)
This calculates the server digest value based on user stored password.
|
boolean |
equals(Object o) |
String |
getUsername() |
int |
hashCode() |
String |
toString() |
getToken
getClientName, getUserProfile, setClientName, setUserProfile
public DigestCredentials(String token, String httpMethod, String clientName, String username, String realm, String nonce, String uri, String cnonce, String nc, String qop)
token
- the tokenhttpMethod
- the HTTP methodclientName
- the client nameusername
- the user namerealm
- the realmnonce
- nonceuri
- uricnonce
- cnoncenc
- ncqop
- qoppublic String calculateServerDigest(boolean passwordAlreadyEncoded, String password)
passwordAlreadyEncoded
- false if the server stored password is in clear, true otherwisepassword
- user password stored server-sidepublic String getUsername()
public boolean equals(Object o)
equals
in class TokenCredentials
public int hashCode()
hashCode
in class TokenCredentials
public String toString()
toString
in class TokenCredentials
Copyright © 2018. All rights reserved.