Module io.inverno.mod.security
Class RawPassword
java.lang.Object
io.inverno.mod.security.authentication.password.AbstractPassword<RawPassword,RawPassword.Encoder>
io.inverno.mod.security.authentication.password.RawPassword
- All Implemented Interfaces:
Password<RawPassword,
RawPassword.Encoder>
Represents a raw unencoded password.
This password implementation is not secured and MUST NOT be used for password serialization, in particular for password storage. It should only be considered during an authentication process to represent user provided passwords.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A raw (no-op) password encoder implementation. -
Field Summary
Modifier and TypeFieldDescriptionprotected static final RawPassword.Encoder
The raw (no-op) password encoder.Fields inherited from class io.inverno.mod.security.authentication.password.AbstractPassword
encoder, value
-
Constructor Summary
ModifierConstructorDescriptionRawPassword
(String raw) Creates a raw password with the specified value.protected
RawPassword
(String raw, RawPassword.Encoder encoder) Creates a raw password with the specified value and encoder. -
Method Summary
Methods inherited from class io.inverno.mod.security.authentication.password.AbstractPassword
getEncoder
-
Field Details
-
RAW_PASSWORD_ENCODER
The raw (no-op) password encoder.
-
-
Constructor Details
-
RawPassword
Creates a raw password with the specified value.
- Parameters:
raw
- the raw password
-
RawPassword
Creates a raw password with the specified value and encoder.
This constructor is only used when recovering a raw password from an encoder (see
RawPassword.Encoder.recover(java.lang.String)
).- Parameters:
raw
- the raw passwordencoder
- the password encoder (should always beRAW_PASSWORD_ENCODER
)
-
-
Method Details
-
getValue
Description copied from interface:Password
Returns the representation of the password encoded with the password encoder.
- Specified by:
getValue
in interfacePassword<RawPassword,
RawPassword.Encoder> - Overrides:
getValue
in classAbstractPassword<RawPassword,
RawPassword.Encoder> - Returns:
- the encoded password representation
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractPassword<RawPassword,
RawPassword.Encoder>
-
equals
- Overrides:
equals
in classAbstractPassword<RawPassword,
RawPassword.Encoder>
-