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.CredentialExchangeAllows 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SMSCredentialResetImplgetSMSCredentialResetBackend()booleanisAuthSMSLimitExceeded(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.
-
-
-
Field Detail
-
ID
static final String ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
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.exceptions.EngineExceptionSend code to the user- Parameters:
force- forcing auth sms limit omittingsandboxCallback- typically null, if in sandbox mode provides callback.- Throws:
pl.edu.icm.unity.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
-
-