Module io.inverno.mod.security
Class RawPassword.Encoder
java.lang.Object
io.inverno.mod.security.authentication.password.RawPassword.Encoder
- All Implemented Interfaces:
Password.Encoder<RawPassword,
RawPassword.Encoder>
- Enclosing class:
RawPassword
public static class RawPassword.Encoder
extends Object
implements Password.Encoder<RawPassword,RawPassword.Encoder>
A raw (no-op) password encoder implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEncodes the specified raw password.boolean
Matches the specified raw password with the specified encoded representation.Recovers a password from its encoded representation generated with this encoder.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.password.Password.Encoder
matches
-
Constructor Details
-
Encoder
public Encoder()
-
-
Method Details
-
recover
Description copied from interface:Password.Encoder
Recovers a password from its encoded representation generated with this encoder.
- Specified by:
recover
in interfacePassword.Encoder<RawPassword,
RawPassword.Encoder> - Parameters:
encoded
- an encoded password representation- Returns:
- a password
- Throws:
PasswordException
- if there was an error recovering the password or if the specified encoded representation was not generated with this encoder
-
encode
Description copied from interface:Password.Encoder
Encodes the specified raw password.
- Specified by:
encode
in interfacePassword.Encoder<RawPassword,
RawPassword.Encoder> - Parameters:
raw
- a raw password- Returns:
- an encoded password
- Throws:
PasswordException
- if there was an error encoding the password
-
matches
Description copied from interface:Password.Encoder
Matches the specified raw password with the specified encoded representation.
- Specified by:
matches
in interfacePassword.Encoder<RawPassword,
RawPassword.Encoder> - Parameters:
raw
- a raw passwordencoded
- an encoded password- Returns:
- true if passwords match, false otherwise
- Throws:
PasswordException
- if there was an error matching passwords
-