Class StoreAuthenticationPlugin
java.lang.Object
io.vertigo.account.plugins.authentication.store.StoreAuthenticationPlugin
- All Implemented Interfaces:
AuthenticationPlugin,io.vertigo.core.node.component.Activeable,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin
public class StoreAuthenticationPlugin
extends Object
implements AuthenticationPlugin, io.vertigo.core.node.component.Activeable
A Store implementation of the Realm interface that
- Author:
- npiedeloup
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UsernamePasswordAuthenticationTokenprotected io.vertigo.datamodel.data.definitions.DataDefinition -
Constructor Summary
ConstructorsConstructorDescriptionStoreAuthenticationPlugin(String userCredentialEntity, String userLoginField, String userPasswordField, String userTokenIdField, io.vertigo.datastore.entitystore.EntityStoreManager entityStoreManager) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidstart()voidstop()booleansupports(AuthenticationToken token) Convenience implementation that returns getAuthenticationTokenClass().isAssignableFrom( token.getClass() );.
-
Field Details
-
userCredentialDefinition
protected io.vertigo.datamodel.data.definitions.DataDefinition userCredentialDefinition -
defaultUserTrustedCredential
-
-
Constructor Details
-
StoreAuthenticationPlugin
@Inject public StoreAuthenticationPlugin(String userCredentialEntity, String userLoginField, String userPasswordField, String userTokenIdField, io.vertigo.datastore.entitystore.EntityStoreManager entityStoreManager) Constructor.- Parameters:
userCredentialEntity- Entity name of userCredentialObjectuserLoginField- Login fieldNameuserPasswordField- Encoded Password fieldNameuserTokenIdField- TokenId fieldNameentityStoreManager- Store Manager
-
-
Method Details
-
supports
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.Classinvalid input: '<'? extends org.apache.shiro.authc.AuthenticationToken>), as opposed to overriding this method.- Specified by:
supportsin interfaceAuthenticationPlugin- 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
- Specified by:
authenticateAccountin interfaceAuthenticationPlugin- Parameters:
token- the token being submitted for authentication.- Returns:
- Validated Principal corresponding to the given token, or Option.empty if authentication fail.
-
start
public void start()- Specified by:
startin interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()- Specified by:
stopin interfaceio.vertigo.core.node.component.Activeable
-