Class AuthenticationManagerImpl
- java.lang.Object
-
- io.vertigo.account.impl.authentication.AuthenticationManagerImpl
-
- All Implemented Interfaces:
AuthenticationManager
,io.vertigo.core.node.component.Component
,io.vertigo.core.node.component.CoreComponent
,io.vertigo.core.node.component.Manager
public final class AuthenticationManagerImpl extends Object implements AuthenticationManager
Main authentication manager implementation.- Author:
- npiedeloup
-
-
Constructor Summary
Constructors Constructor Description AuthenticationManagerImpl(AccountManager accountManager, VSecurityManager securityManager, List<AuthenticationPlugin> authenticationPlugins)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Account>
getLoggedAccount()
Optional<Account>
login(AuthenticationToken token)
Tries and checks to login.void
logout()
Closes the current session.
-
-
-
Constructor Detail
-
AuthenticationManagerImpl
@Inject public AuthenticationManagerImpl(AccountManager accountManager, VSecurityManager securityManager, List<AuthenticationPlugin> authenticationPlugins)
Constructor.- Parameters:
accountManager
- the account ManagersecurityManager
- the security ManagerauthenticationPlugins
- List of authenticationPlugins
-
-
Method Detail
-
login
public Optional<Account> login(AuthenticationToken token)
Tries and checks to login.- Specified by:
login
in interfaceAuthenticationManager
- Parameters:
token
- the authentification token- Returns:
- Account the user account (Principal)
-
getLoggedAccount
public Optional<Account> getLoggedAccount()
- Specified by:
getLoggedAccount
in interfaceAuthenticationManager
- Returns:
- the current logged account
-
logout
public void logout()
Closes the current session.- Specified by:
logout
in interfaceAuthenticationManager
-
-