Class UsernamePasswordCredentials
java.lang.Object
io.micronaut.security.authentication.UsernamePasswordCredentials
- All Implemented Interfaces:
AuthenticationRequest<String,
,String> Serializable
@Introspected
public class UsernamePasswordCredentials
extends Object
implements Serializable, AuthenticationRequest<String,String>
- Since:
- 1.0
- Author:
- Sergio del Amo
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor.UsernamePasswordCredentials
(String username, String password) -
Method Summary
Modifier and TypeMethodDescriptionboolean
password getter.Returns password conforming toAuthenticationRequest
blueprint.username getter.int
hashCode()
void
setPassword
(String password) password setter.void
setUsername
(String username) username setter.
-
Constructor Details
-
UsernamePasswordCredentials
public UsernamePasswordCredentials()Empty constructor. -
UsernamePasswordCredentials
- Parameters:
username
- e.g. adminpassword
- raw password
-
-
Method Details
-
getUsername
username getter.- Returns:
- e.g. admin
-
setUsername
username setter.- Parameters:
username
- e.g. admin
-
getPassword
password getter.- Returns:
- raw password
-
setPassword
password setter.- Parameters:
password
- raw password
-
getIdentity
- Specified by:
getIdentity
in interfaceAuthenticationRequest<String,
String> - Returns:
- The token in the request
-
getSecret
Returns password conforming toAuthenticationRequest
blueprint.- Specified by:
getSecret
in interfaceAuthenticationRequest<String,
String> - Returns:
- secret string.
-
equals
-
hashCode
public int hashCode()
-