Module io.inverno.mod.security.http
Class DigestPassword.Encoder
java.lang.Object
io.inverno.mod.security.http.digest.DigestPassword.Encoder
- All Implemented Interfaces:
Password.Encoder<DigestPassword,DigestPassword.Encoder>
- Enclosing class:
DigestPassword
public class DigestPassword.Encoder
extends Object
implements Password.Encoder<DigestPassword,DigestPassword.Encoder>
An HTTP Digest password encoder implementation as defined by RFC 7616 Section 3.4.2.
The encoded password corresponds to A1 in RFC 7616 which is constant in the HTTP digest authentication process.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm.getRealm()Returns the realm.Returns the username.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.security.authentication.password.Password.Encoder
matches
-
Constructor Details
-
Encoder
Creates a digest password encoder with the specified algorithm, username and realm.
- Parameters:
algorithm- the algorithmusername- the usernamerealm- the realm
-
-
Method Details
-
getAlgorithm
Returns the algorithm.
- Returns:
- the algorithm
-
getUsername
Returns the username.
- Returns:
- the username
-
getRealm
Returns the realm.
- Returns:
- the realm
-
recover
- Specified by:
recoverin interfacePassword.Encoder<DigestPassword,DigestPassword.Encoder> - Throws:
PasswordException
-
encode
- Specified by:
encodein interfacePassword.Encoder<DigestPassword,DigestPassword.Encoder> - Throws:
PasswordException
-
matches
- Specified by:
matchesin interfacePassword.Encoder<DigestPassword,DigestPassword.Encoder> - Throws:
PasswordException
-