Class JWTAuthHandler

java.lang.Object
io.vertx.reactivex.ext.web.handler.JWTAuthHandler
All Implemented Interfaces:
Handler<RoutingContext>, io.vertx.lang.rx.RxDelegate, AuthenticationHandler

public class JWTAuthHandler extends Object implements io.vertx.lang.rx.RxDelegate, AuthenticationHandler, Handler<RoutingContext>
An auth handler that provides JWT Authentication support.

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

  • Field Details

    • __TYPE_ARG

      public static final io.vertx.lang.rx.TypeArg<JWTAuthHandler> __TYPE_ARG
  • Constructor Details

    • JWTAuthHandler

      public JWTAuthHandler(JWTAuthHandler delegate)
    • JWTAuthHandler

      public JWTAuthHandler(Object delegate)
  • Method Details

    • 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 JWTAuthHandler getDelegate()
      Specified by:
      getDelegate in interface AuthenticationHandler
      Specified by:
      getDelegate in interface io.vertx.lang.rx.RxDelegate
    • handle

      public void handle(RoutingContext event)
      Something has happened, so handle it.
      Specified by:
      handle in interface AuthenticationHandler
      Specified by:
      handle in interface Handler<RoutingContext>
      Parameters:
      event - the event to handle
    • create

      public static JWTAuthHandler create(JWTAuth authProvider)
      Create a JWT auth handler. When no scopes are explicit declared, the default scopes will be looked up from the route metadata.
      Parameters:
      authProvider - the auth provider to use
      Returns:
      the auth handler
    • create

      public static JWTAuthHandler create(JWTAuth authProvider, String realm)
      Create a JWT auth handler. When no scopes are explicit declared, the default scopes will be looked up from the route metadata.
      Parameters:
      authProvider - the auth provider to use
      realm -
      Returns:
      the auth handler
    • scopeDelimiter

      public JWTAuthHandler scopeDelimiter(String delimiter)
      Set the scope delimiter. By default this is a space character.
      Parameters:
      delimiter - scope delimiter.
      Returns:
      fluent self.
    • withScope

      public JWTAuthHandler withScope(String scope)
      Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance. When scopes are applied to the handler, the default scopes from the route metadata will be ignored.
      Parameters:
      scope - scope.
      Returns:
      new instance of this interface.
    • withScopes

      public JWTAuthHandler withScopes(List<String> scopes)
      Return a new instance with the internal state copied from the caller but the scopes to be requested during a token request are unique to the instance. When scopes are applied to the handler, the default scopes from the route metadata will be ignored.
      Parameters:
      scopes - scopes.
      Returns:
      new instance of this interface.
    • newInstance

      public static JWTAuthHandler newInstance(JWTAuthHandler arg)