Class StoreIdentityProviderPlugin
- java.lang.Object
-
- io.vertigo.account.plugins.identityprovider.store.StoreIdentityProviderPlugin
-
- All Implemented Interfaces:
IdentityProviderPlugin
,io.vertigo.core.node.component.Activeable
,io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Plugin
public final class StoreIdentityProviderPlugin extends Object implements IdentityProviderPlugin, io.vertigo.core.node.component.Activeable
Source of identity.- Author:
- npiedeloup
-
-
Constructor Summary
Constructors Constructor Description StoreIdentityProviderPlugin(String userIdentityEntity, String userAuthField, Optional<String> photoIdField, Optional<String> photoFileInfo, EntityStoreManager entityStoreManager, FileStoreManager fileStoreManager)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends io.vertigo.datamodel.structure.model.Entity>
List<E>getAllUsers()
<E extends io.vertigo.datamodel.structure.model.Entity>
Optional<VFile>getPhoto(io.vertigo.datamodel.structure.model.UID<E> userURI)
Gets the photo of an account defined by its URI.<E extends io.vertigo.datamodel.structure.model.Entity>
EgetUserByAuthToken(String userAuthToken)
Gets an newly authentified account by his authToken.long
getUsersCount()
void
start()
void
stop()
-
-
-
Constructor Detail
-
StoreIdentityProviderPlugin
@Inject public StoreIdentityProviderPlugin(String userIdentityEntity, String userAuthField, Optional<String> photoIdField, Optional<String> photoFileInfo, EntityStoreManager entityStoreManager, FileStoreManager fileStoreManager)
Constructor.- Parameters:
userIdentityEntity
- Entity name of userIdentityEntityuserAuthField
- FieldName use to find user by it's authTokenentityStoreManager
- Store ManagerfileStoreManager
- Store Manager
-
-
Method Detail
-
getUserByAuthToken
public <E extends io.vertigo.datamodel.structure.model.Entity> E getUserByAuthToken(String userAuthToken)
Gets an newly authentified account by his authToken.- Specified by:
getUserByAuthToken
in interfaceIdentityProviderPlugin
- Type Parameters:
E
- project's User entity type- Parameters:
userAuthToken
- user authToken- Returns:
- Logged account
-
getUsersCount
public long getUsersCount()
- Specified by:
getUsersCount
in interfaceIdentityProviderPlugin
- Returns:
- the number of accounts
-
getAllUsers
public <E extends io.vertigo.datamodel.structure.model.Entity> List<E> getAllUsers()
- Specified by:
getAllUsers
in interfaceIdentityProviderPlugin
- Type Parameters:
E
- project's User entity type- Returns:
- all users
-
getPhoto
public <E extends io.vertigo.datamodel.structure.model.Entity> Optional<VFile> getPhoto(io.vertigo.datamodel.structure.model.UID<E> userURI)
Gets the photo of an account defined by its URI.- Specified by:
getPhoto
in interfaceIdentityProviderPlugin
- Type Parameters:
E
- project's User entity type- Parameters:
userURI
- the account defined by its URI- Returns:
- the photo as a file
-
start
public void start()
- Specified by:
start
in interfaceio.vertigo.core.node.component.Activeable
-
stop
public void stop()
- Specified by:
stop
in interfaceio.vertigo.core.node.component.Activeable
-
-