Interface SMSExchange
- All Superinterfaces:
pl.edu.icm.unity.engine.api.authn.CredentialExchange
- All Known Implementing Classes:
SMSVerificator
public interface SMSExchange
extends pl.edu.icm.unity.engine.api.authn.CredentialExchange
Allows for exchanging a sms code. Standard flow is simple - first we send
code to the user and next we verify that the code typed by user is the same as
sent code. Sms limit can be checked and when is exceeded then send code with force option can
be used.
- Author:
- P.Piernik
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAuthSMSLimitExceeded(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username) Check if sms authn sending limit is exceededpl.edu.icm.unity.engine.api.confirmation.SMSCodesendCode(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username, boolean force) Send code to the userpl.edu.icm.unity.engine.api.authn.AuthenticationResultverifyCode(pl.edu.icm.unity.engine.api.confirmation.SMSCode sentCode, String codeFromUser, pl.edu.icm.unity.engine.api.authn.AuthenticationSubject subject) Verifies the user provided sms code.Methods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialExchange
getExchangeId
-
Field Details
-
ID
- See Also:
-
-
Method Details
-
sendCode
pl.edu.icm.unity.engine.api.confirmation.SMSCode sendCode(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username, boolean force) throws pl.edu.icm.unity.base.exceptions.EngineException Send code to the user- Parameters:
force- forcing auth sms limit omittingsandboxCallback- typically null, if in sandbox mode provides callback.- Throws:
pl.edu.icm.unity.base.exceptions.EngineException
-
verifyCode
pl.edu.icm.unity.engine.api.authn.AuthenticationResult verifyCode(pl.edu.icm.unity.engine.api.confirmation.SMSCode sentCode, String codeFromUser, pl.edu.icm.unity.engine.api.authn.AuthenticationSubject subject) Verifies the user provided sms code. -
isAuthSMSLimitExceeded
boolean isAuthSMSLimitExceeded(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username) Check if sms authn sending limit is exceeded -
getSMSCredentialResetBackend
SMSCredentialResetImpl getSMSCredentialResetBackend()- Returns:
- credential reset backend
-