Class LdapIdentityProviderPlugin
java.lang.Object
io.vertigo.account.plugins.identityprovider.ldap.LdapIdentityProviderPlugin
- 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 LdapIdentityProviderPlugin
extends Object
implements IdentityProviderPlugin, io.vertigo.core.node.component.Activeable
Source of identity.
- Author:
- npiedeloup
-
Constructor Summary
ConstructorsConstructorDescriptionLdapIdentityProviderPlugin(String ldapAccountBaseDn, String ldapUserAuthAttribute, String userIdentityEntity, String ldapUserAttributeMappingStr, Optional<String> connectorNameOpt, io.vertigo.commons.codec.CodecManager codecManager, io.vertigo.datamodel.smarttype.SmartTypeManager smartTypeManager, List<io.vertigo.connectors.ldap.LdapConnector> ldapConnectors) Constructor. -
Method Summary
Modifier and TypeMethodDescription<E extends io.vertigo.datamodel.data.model.Entity>
List<E> <E extends io.vertigo.datamodel.data.model.Entity>
Optional<io.vertigo.datastore.filestore.model.VFile> getPhoto(io.vertigo.datamodel.data.model.UID<E> accountURI) Gets the photo of an account defined by its URI.<E extends io.vertigo.datamodel.data.model.Entity>
EgetUserByAuthToken(String userAuthToken) Gets an newly authentified account by his authToken.longvoidstart()voidstop()
-
Constructor Details
-
LdapIdentityProviderPlugin
@Inject public LdapIdentityProviderPlugin(String ldapAccountBaseDn, String ldapUserAuthAttribute, String userIdentityEntity, String ldapUserAttributeMappingStr, Optional<String> connectorNameOpt, io.vertigo.commons.codec.CodecManager codecManager, io.vertigo.datamodel.smarttype.SmartTypeManager smartTypeManager, List<io.vertigo.connectors.ldap.LdapConnector> ldapConnectors) Constructor.- Parameters:
ldapAccountBaseDn- Base de recherche des DNs d'AccountsldapUserAuthAttribute- Ldap attribute use to find user by it's authTokenuserIdentityEntity- DtDefinition used for UserldapUserAttributeMappingStr- Mapping from LDAP to AccountcodecManager- Codec ManagerldapServerHost- Ldap Server hostldapServerPort- Ldap server port (default : 389)ldapReaderLogin- Login du reader LDAPldapReaderPassword- Password du reader LDAP
-
-
Method Details
-
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
-
getUserByAuthToken
public <E extends io.vertigo.datamodel.data.model.Entity> E getUserByAuthToken(String userAuthToken) Gets an newly authentified account by his authToken.- Specified by:
getUserByAuthTokenin interfaceIdentityProviderPlugin- Type Parameters:
E- project's User entity type- Parameters:
userAuthToken- user authToken- Returns:
- Logged account
-
getUsersCount
public long getUsersCount()- Specified by:
getUsersCountin interfaceIdentityProviderPlugin- Returns:
- the number of accounts
-
getAllUsers
- Specified by:
getAllUsersin interfaceIdentityProviderPlugin- Type Parameters:
E- project's User entity type- Returns:
- all users
-
getPhoto
public <E extends io.vertigo.datamodel.data.model.Entity> Optional<io.vertigo.datastore.filestore.model.VFile> getPhoto(io.vertigo.datamodel.data.model.UID<E> accountURI) Gets the photo of an account defined by its URI.- Specified by:
getPhotoin interfaceIdentityProviderPlugin- Type Parameters:
E- project's User entity type- Parameters:
accountURI- the account defined by its URI- Returns:
- the photo as a file
-