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