Class DigestCredentialsMatcher<A extends LoginCredentials>
- Type Parameters:
A- the type of login credentials
- All Implemented Interfaces:
CredentialsMatcher<DigestCredentials,A>
A credentials matcher used to verify digest credentials as defined by RFC 7616.
HTTP Digest authentication basically requires a raw password in the login credentials in order to compute A1 as defined by
RFC 7616 Section 3.4.2 and compute the expected digest response. This implementation accepts login credentials with raw
password as well as login credentials with DigestPassword which allows to store login credentials with encoded passwords (still limited to digest encoding). Using any other type of password
in the login credentials will result in an authentication failure.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionDigestCredentialsMatcher(String secret) Creates a digest credentials matcher with the specified secret. -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(DigestCredentials credentials, A otherCredentials)
-
Constructor Details
-
DigestCredentialsMatcher
Creates a digest credentials matcher with the specified secret.
The secret must be the same as the one specified used to generate the
www-authenticateheader previously sent to the client.- Parameters:
secret- the secret
-
-
Method Details
-
matches
public boolean matches(DigestCredentials credentials, A otherCredentials) throws AuthenticationException - Specified by:
matchesin interfaceCredentialsMatcher<DigestCredentials,A extends LoginCredentials> - Throws:
AuthenticationException
-