io.vertx.rxjava3.ext.web.handler

## Class OtpAuthHandler

- java.lang.Object
- - io.vertx.rxjava3.ext.web.handler.OtpAuthHandler

- All Implemented Interfaces:
    Handler<RoutingContext>, AuthenticationHandler

      public class OtpAuthHandler
      extends Object
      implements AuthenticationHandler, Handler<RoutingContext>

  An auth handler that provides One Time Password (Multi-Factor) Authentication support.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<OtpAuthHandler>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OtpAuthHandler(Object delegate)`
    `OtpAuthHandler(OtpAuthHandler delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static OtpAuthHandler` | `create(HotpAuth hotpAuth)` Create a new instance of this handler using a hash based one time password authentication provider.
    `static OtpAuthHandler` | `create(TotpAuth totpAuth)` Create a new instance of this handler using a time based one time password authentication provider.
    `boolean` | `equals(Object o)`
    `OtpAuthHandler` | `getDelegate()`
    `void` | `handle(RoutingContext event)` Something has happened, so handle it.
    `int` | `hashCode()`
    `OtpAuthHandler` | `issuer(String issuer)` Configure the `issuer` value to be shown in the authenticator URL.
    `OtpAuthHandler` | `label(String label)` Configure the `label` value to be shown in the authenticator URL.
    `static OtpAuthHandler` | `newInstance(OtpAuthHandler arg)`
    `OtpAuthHandler` | `setupCallback(Route route)` Setup the required route where authenticators to submit the challenge response.
    `OtpAuthHandler` | `setupRegisterCallback(Route route)` Setup the optional route where authenticators are allowed to register.
    `String` | `toString()`
    `OtpAuthHandler` | `verifyUrl(String url)` Specify the URL where requests are to be redirected when a user is already known in the request.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.rxjava3.ext.web.handler.AuthenticationHandler

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<OtpAuthHandler> __TYPE_ARG

  - ### Constructor Detail

    - #### OtpAuthHandler

          public OtpAuthHandler(OtpAuthHandler delegate)

    - #### OtpAuthHandler

          public OtpAuthHandler(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public OtpAuthHandler getDelegate()

      Specified by:
        `getDelegate` in interface `AuthenticationHandler`

    - #### handle

          public void handle(RoutingContext event)

      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Specified by:
        `handle` in interface `AuthenticationHandler`
      Parameters:
        `event` - the event to handle

    - #### create

          public static OtpAuthHandler create(TotpAuth totpAuth)

      Create a new instance of this handler using a time based one time password authentication provider.
      Parameters:
        `totpAuth` - the time based OTP provider.
      Returns:
        new instance of the handler.

    - #### create

          public static OtpAuthHandler create(HotpAuth hotpAuth)

      Create a new instance of this handler using a hash based one time password authentication provider.
      Parameters:
        `hotpAuth` - the hash based OTP provider.
      Returns:
        new instance of the handler.

    - #### verifyUrl

          public OtpAuthHandler verifyUrl(String url)

      Specify the URL where requests are to be redirected when a user is already known in the request. A user is already known when the is not `null`. If no redirect is provided, requests are terminated immediately with status code `401`.
      Parameters:
        `url` - the location where users are to be asked for the OTP code.
      Returns:
        fluent self.

    - #### setupRegisterCallback

          public OtpAuthHandler setupRegisterCallback(Route route)

      Setup the optional route where authenticators are allowed to register. Registration is only allowed on requests with a valid user. A user is valid when the is not `null`.
      Parameters:
        `route` - the location where users are to register new authenticator devices/apps.
      Returns:
        fluent self.

    - #### setupCallback

          public OtpAuthHandler setupCallback(Route route)

      Setup the required route where authenticators to submit the challenge response. Challenges are only allowed on requests with a valid user. A user is valid when the is not `null`.
      Parameters:
        `route` - the location where users are to submit challenge responses from authenticator devices/apps.
      Returns:
        fluent self.

    - #### issuer

          public OtpAuthHandler issuer(String issuer)

      Configure the `issuer` value to be shown in the authenticator URL.
      Parameters:
        `issuer` - a `String` for example `Vert.x OTP`
      Returns:
        fluent self.

    - #### label

          public OtpAuthHandler label(String label)

      Configure the `label` value to be shown in the authenticator URL. When this value is provided it will overwrite the default label which is composed of the `issuer` and the current `user` id.
      Parameters:
        `label` - a `String` for example `Vert.x OTP`
      Returns:
        fluent self.

    - #### newInstance

          public static OtpAuthHandler newInstance(OtpAuthHandler arg)

Copyright © 2022 Eclipse. All rights reserved.