Interface AuthenticationPlugin
-
- All Superinterfaces:
io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Plugin
- All Known Implementing Classes:
LdapAuthenticationPlugin
,MockAuthenticationPlugin
,StoreAuthenticationPlugin
,TextAuthenticationPlugin
public interface AuthenticationPlugin extends io.vertigo.core.node.component.Plugin
Plugin use for authentification. Inspired by org.apache.shiro.realm.AuthenticatingRealm.- Author:
- npiedeloup
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<String>
authenticateAccount(AuthenticationToken token)
boolean
supports(AuthenticationToken token)
Convenience implementation that returns getAuthenticationTokenClass().isAssignableFrom( token.getClass() );.
-
-
-
Method Detail
-
supports
boolean supports(AuthenticationToken token)
Convenience implementation that returns getAuthenticationTokenClass().isAssignableFrom( token.getClass() );. Can be overridden by subclasses for more complex token checking. Most configurations will only need to set a different class via setAuthenticationTokenClass(java.lang.Class extends org.apache.shiro.authc.AuthenticationToken>), as opposed to overriding this method.- Parameters:
token
- the token being submitted for authentication.- Returns:
- true if this authentication realm can process the submitted token instance of the class, false otherwise.
-
authenticateAccount
Optional<String> authenticateAccount(AuthenticationToken token)
- Parameters:
token
- the token being submitted for authentication.- Returns:
- Validated Principal corresponding to the given token, or Option.empty if authentication fail.
-
-