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
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    isAuthSMSLimitExceeded(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username)
    Check if sms authn sending limit is exceeded
    pl.edu.icm.unity.engine.api.confirmation.SMSCode
    sendCode(pl.edu.icm.unity.engine.api.authn.AuthenticationSubject username, boolean force)
    Send code to the user
    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.

    Methods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialExchange

    getExchangeId
  • Field Details

  • 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 omitting
      sandboxCallback - 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