Class UsernamePasswordCredentials

java.lang.Object
io.micronaut.security.authentication.UsernamePasswordCredentials
All Implemented Interfaces:
AuthenticationRequest<String,String>, Serializable

public class UsernamePasswordCredentials extends Object implements Serializable, AuthenticationRequest<String,String>
Since:
1.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • UsernamePasswordCredentials

      @Creator public UsernamePasswordCredentials(@Nullable @Nullable String username, @Nullable @Nullable String password)
      Parameters:
      username - e.g. admin
      password - raw password
    • UsernamePasswordCredentials

      public UsernamePasswordCredentials()
      Default constructor.
  • Method Details

    • getUsername

      @Nullable public @Nullable String getUsername()
      username getter.
      Returns:
      e.g. admin
    • setUsername

      public void setUsername(@Nullable @Nullable String username)
      username setter.
      Parameters:
      username - e.g. admin
    • getPassword

      @Nullable public @Nullable String getPassword()
      password getter.
      Returns:
      raw password
    • setPassword

      public void setPassword(@Nullable @Nullable String password)
      password setter.
      Parameters:
      password - raw password
    • getIdentity

      @Nullable public @Nullable String getIdentity()
      Specified by:
      getIdentity in interface AuthenticationRequest<String,String>
      Returns:
      The token in the request
    • getSecret

      @Nullable public @Nullable String getSecret()
      Returns password conforming to AuthenticationRequest blueprint.
      Specified by:
      getSecret in interface AuthenticationRequest<String,String>
      Returns:
      secret string.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object