Class OtpCredentials

java.lang.Object
io.vertx.ext.auth.otp.OtpCredentials
All Implemented Interfaces:
Credentials

public class OtpCredentials extends Object implements Credentials
Credentials for HotpAuth or TotpAuth authentication providers.
Author:
Dmitry Novikov
  • Constructor Details

    • OtpCredentials

      public OtpCredentials(JsonObject jsonObject)
    • OtpCredentials

      public OtpCredentials(String identifier, String code)
  • Method Details

    • getCode

      public String getCode()
    • getIdentifier

      public String getIdentifier()
    • setCode

      public OtpCredentials setCode(String code)
    • setIdentifier

      public OtpCredentials setIdentifier(String identifier)
    • checkValid

      public <V> void checkValid(V arg) throws CredentialValidationException
      Description copied from interface: Credentials
      Implementors should override this method to perform validation. An argument is allowed to allow custom validation, for example, when given a configuration property, a specific property may be allowed to be null.
      Specified by:
      checkValid in interface Credentials
      Type Parameters:
      V - the generic type of the argument
      Parameters:
      arg - optional argument or null.
      Throws:
      CredentialValidationException - when the validation fails
    • toJson

      public JsonObject toJson()
      Description copied from interface: Credentials
      Simple interop to downcast back to JSON for backwards compatibility.
      Specified by:
      toJson in interface Credentials
      Returns:
      JSON representation of this credential.