Module io.inverno.mod.security
Class GenericLoginCredentials
java.lang.Object
io.inverno.mod.security.internal.authentication.GenericLoginCredentials
- All Implemented Interfaces:
Credentials,LoginCredentials,PrincipalCredentials
Generic LoginCredentials implementation.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorsConstructorDescriptionGenericLoginCredentials(String username, Password<?, ?> password) Creates generic credentials with the specified username and password. -
Method Summary
-
Constructor Details
-
GenericLoginCredentials
public GenericLoginCredentials(String username, Password<?, ?> password) throws InvalidCredentialsExceptionCreates generic credentials with the specified username and password.
- Parameters:
username- the usernamepassword- the password- Throws:
InvalidCredentialsException- if the username is blank
-
-
Method Details
-
getUsername
Description copied from interface:PrincipalCredentialsReturns the unique username associated to the entity.
- Specified by:
getUsernamein interfacePrincipalCredentials- Returns:
- a username
-
getPassword
Description copied from interface:LoginCredentialsReturns the password.
- Specified by:
getPasswordin interfaceLoginCredentials- Returns:
- a password
-
isLocked
public boolean isLocked()Description copied from interface:CredentialsDetermines whether a credentials is locked.
Locked credentials should be considered invalid by authenticators when matching provided credentials with stored entity credentials.
- Specified by:
isLockedin interfaceCredentials- Returns:
- true if credentials are locked, false otherwise
-
setLocked
public void setLocked(boolean locked) Locks/Unlocks the credentials.- Parameters:
locked- true to lock the credentials, false otherwise
-