Class MultifactorAuthenticationManager
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.core.authentication.MultifactorAuthenticationManager
org.ametys.plugins.site.authentication.MultifactorAuthenticationManager
- All Implemented Interfaces:
LogEnabled,Disposable,Initializable,Component,Contextualizable,Serviceable
The component to handle Multifactor authentication
Provides methods to generate, send and check MFA codes
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.core.authentication.MultifactorAuthenticationManager
MultifactorAuthenticationManager.MultifactorAuthenticationCode -
Field Summary
Fields inherited from class org.ametys.plugins.core.authentication.MultifactorAuthenticationManager
_context, _cryptoHelpers, _currentUserProvider, _i18nUtils, _serviceManager, _sqlDatabaseTypeExtensionPoint, _userLanguagesManager, _userManager, ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsendMultifactorAuthenticationCodeByMail(Request request, UserIdentity userIdentity, String multifactorAuthenticationCode) Generate a MFA code and send it by mail to the given userMethods inherited from class org.ametys.plugins.core.authentication.MultifactorAuthenticationManager
_getMailSubjectPrefix, authenticationApplicationForCurrentUser, contextualize, dispose, generateMultifactorAuthenticationCode, getCurrentUserQrData, getDatasourceId, getEmailCodeDuration, getSQLTableName, getUserSecretForCurrentUser, initialize, initializeMFACryptoComponent, isAuthenticationApplicationActivated, isValidMultifactorAuthenticationCode, renewSecret, renewSecretForCurrentUser, serviceMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
MultifactorAuthenticationManager
public MultifactorAuthenticationManager()
-
-
Method Details
-
sendMultifactorAuthenticationCodeByMail
public void sendMultifactorAuthenticationCodeByMail(Request request, UserIdentity userIdentity, String multifactorAuthenticationCode) throws RuntimeException Description copied from class:MultifactorAuthenticationManagerGenerate a MFA code and send it by mail to the given user- Overrides:
sendMultifactorAuthenticationCodeByMailin classMultifactorAuthenticationManager- Parameters:
request- the requestuserIdentity- the user trying to connectmultifactorAuthenticationCode- the multifactor authentication code to send- Throws:
RuntimeException- if an error occurs while sending the mail with the code
-