Class UsernamePasswordAuthenticationToken
- java.lang.Object
-
- io.vertigo.account.impl.authentication.UsernamePasswordAuthenticationToken
-
- All Implemented Interfaces:
AuthenticationToken
public final class UsernamePasswordAuthenticationToken extends Object implements AuthenticationToken
- Author:
- npiedeloup
-
-
Constructor Summary
Constructors Constructor Description UsernamePasswordAuthenticationToken(String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPassword()
Returns the password submitted during an authentication attemptString
getPrincipal()
boolean
match(AuthenticationToken trustedAuthenticationToken)
Checks if this User-submitted AuthenticationToken matches the realm trustedAuthenticationToken.
-
-
-
Method Detail
-
getPrincipal
public String getPrincipal()
- Specified by:
getPrincipal
in interfaceAuthenticationToken
- Returns:
- the username submitted during an authentication attempt.
-
getPassword
public String getPassword()
Returns the password submitted during an authentication attempt- Returns:
- the password submitted during an authentication attempt.
-
match
public boolean match(AuthenticationToken trustedAuthenticationToken)
Checks if this User-submitted AuthenticationToken matches the realm trustedAuthenticationToken.- Specified by:
match
in interfaceAuthenticationToken
- Parameters:
trustedAuthenticationToken
- the realm trustedAuthenticationToken- Returns:
- if this token matches
-
-