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 java.lang.String ID  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      SMSCredentialResetImpl getSMSCredentialResetBackend()  
      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, java.lang.String codeFromUser, pl.edu.icm.unity.engine.api.authn.AuthenticationSubject subject, pl.edu.icm.unity.engine.api.authn.remote.SandboxAuthnResultCallback sandboxCallback)
      Verifies the user provided sms code.
      • Methods inherited from interface pl.edu.icm.unity.engine.api.authn.CredentialExchange

        getExchangeId
    • 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.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.exceptions.EngineException
      • verifyCode

        pl.edu.icm.unity.engine.api.authn.AuthenticationResult verifyCode​(pl.edu.icm.unity.engine.api.confirmation.SMSCode sentCode,
                                                                          java.lang.String codeFromUser,
                                                                          pl.edu.icm.unity.engine.api.authn.AuthenticationSubject subject,
                                                                          pl.edu.icm.unity.engine.api.authn.remote.SandboxAuthnResultCallback sandboxCallback)
        Verifies the user provided sms code.
        Parameters:
        sandboxCallback - typically null, if in sandbox mode provides callback.
      • 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