Class LdapAuthenticationPlugin
- java.lang.Object
-
- io.vertigo.account.plugins.authentication.ldap.LdapAuthenticationPlugin
-
- All Implemented Interfaces:
AuthenticationPlugin,io.vertigo.core.node.component.CoreComponent,io.vertigo.core.node.component.Plugin
public final class LdapAuthenticationPlugin extends Object implements AuthenticationPlugin
LDAP impl of Authentification.- Author:
- npiedeloup
-
-
Constructor Summary
Constructors Constructor Description LdapAuthenticationPlugin(String userLoginTemplate, Optional<String> connectorNameOpt, List<io.vertigo.connectors.ldap.LdapConnector> ldapConnectors)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>authenticateAccount(AuthenticationToken token)booleansupports(AuthenticationToken token)Convenience implementation that returns getAuthenticationTokenClass().isAssignableFrom( token.getClass() );.
-
-
-
Constructor Detail
-
LdapAuthenticationPlugin
@Inject public LdapAuthenticationPlugin(String userLoginTemplate, Optional<String> connectorNameOpt, List<io.vertigo.connectors.ldap.LdapConnector> ldapConnectors)
Constructor.- Parameters:
userLoginTemplate- userLoginTemplateldapServerHost- Ldap Server hostldapServerPort- Ldap server port (default : 389)
-
-
Method Detail
-
supports
public 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.- 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
public Optional<String> authenticateAccount(AuthenticationToken token)
- 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.
-
-