Class OAuth2AuthHandler

java.lang.Object
io.vertx.mutiny.ext.web.handler.OAuth2AuthHandler
All Implemented Interfaces:
MutinyDelegate, io.vertx.core.Handler<RoutingContext>, AuthenticationHandler, Consumer<RoutingContext>

public class OAuth2AuthHandler extends Object implements MutinyDelegate, AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.

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

  • Field Details

  • Constructor Details

    • OAuth2AuthHandler

      public OAuth2AuthHandler(io.vertx.ext.web.handler.OAuth2AuthHandler delegate)
    • OAuth2AuthHandler

      public OAuth2AuthHandler(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.handler.OAuth2AuthHandler getDelegate()
      Specified by:
      getDelegate in interface AuthenticationHandler
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • handle

      public void handle(RoutingContext arg0)
      Specified by:
      handle in interface AuthenticationHandler
      Specified by:
      handle in interface io.vertx.core.Handler<RoutingContext>
    • create

      public static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider, String callbackURL)
      Parameters:
      vertx - the vertx instance
      authProvider - the auth provider to use
      callbackURL - the callback URL you entered in your provider admin console, usually it should be something like: `https://myserver:8888/callback`
      Returns:
      the auth handler
    • create

      public static OAuth2AuthHandler create(Vertx vertx, OAuth2Auth authProvider)
      Parameters:
      vertx - the vertx instance
      authProvider - the auth provider to use
      Returns:
      the auth handler
    • extraParams

      public OAuth2AuthHandler extraParams(io.vertx.core.json.JsonObject extraParams)
      Parameters:
      extraParams - extra optional parameters.
      Returns:
      self
    • withScope

      public OAuth2AuthHandler withScope(String scope)
      Parameters:
      scope - scope.
      Returns:
      new instance of this interface.
    • withScopes

      public OAuth2AuthHandler withScopes(List<String> scopes)
      Parameters:
      scopes - scopes.
      Returns:
      new instance of this interface.
    • prompt

      public OAuth2AuthHandler prompt(String prompt)
      Parameters:
      prompt - the prompt choice.
      Returns:
      self
    • pkceVerifierLength

      public OAuth2AuthHandler pkceVerifierLength(int length)
      Parameters:
      length - A number between 43 and 128. Or -1 to disable.
      Returns:
      self
    • setupCallback

      public OAuth2AuthHandler setupCallback(Route route)
      Parameters:
      route - a given route e.g.: `/callback`
      Returns:
      self
    • accept

      public void accept(RoutingContext item)
      Specified by:
      accept in interface AuthenticationHandler
      Specified by:
      accept in interface Consumer<RoutingContext>
    • newInstance

      public static OAuth2AuthHandler newInstance(io.vertx.ext.web.handler.OAuth2AuthHandler arg)