Class 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 Detail

      • LdapIdentityProviderPlugin

        @Inject
        public LdapIdentityProviderPlugin​(String ldapAccountBaseDn,
                                          String ldapUserAuthAttribute,
                                          String userIdentityEntity,
                                          String ldapUserAttributeMappingStr,
                                          Optional<String> connectorNameOpt,
                                          CodecManager codecManager,
                                          io.vertigo.datamodel.smarttype.SmartTypeManager smartTypeManager,
                                          List<io.vertigo.connectors.ldap.LdapConnector> ldapConnectors)
        Constructor.
        Parameters:
        ldapServerHost - Ldap Server host
        ldapServerPort - Ldap server port (default : 389)
        ldapAccountBaseDn - Base de recherche des DNs d'Accounts
        ldapReaderLogin - Login du reader LDAP
        ldapReaderPassword - Password du reader LDAP
        ldapUserAuthAttribute - Ldap attribute use to find user by it's authToken
        userIdentityEntity - DtDefinition used for User
        ldapUserAttributeMappingStr - Mapping from LDAP to Account
        codecManager - Codec Manager
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface io.vertigo.core.node.component.Activeable
      • stop

        public void stop()
        Specified by:
        stop in interface io.vertigo.core.node.component.Activeable
      • 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 interface IdentityProviderPlugin
        Type Parameters:
        E - project's User entity type
        Parameters:
        userAuthToken - user authToken
        Returns:
        Logged account
      • getAllUsers

        public <E extends io.vertigo.datamodel.structure.model.Entity> List<E> getAllUsers()
        Specified by:
        getAllUsers in interface IdentityProviderPlugin
        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> accountURI)
        Gets the photo of an account defined by its URI.
        Specified by:
        getPhoto in interface IdentityProviderPlugin
        Type Parameters:
        E - project's User entity type
        Parameters:
        accountURI - the account defined by its URI
        Returns:
        the photo as a file