Class JWTAuthHandler

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

public class JWTAuthHandler extends Object implements AuthenticationHandler, io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>, MutinyDelegate
An auth handler that provides JWT Authentication support.

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

Author:
Paulo Lopes
See Also:
  • JWTAuthHandler
  • Field Details

  • Constructor Details

    • JWTAuthHandler

      public JWTAuthHandler(io.vertx.ext.web.handler.JWTAuthHandler delegate)
      Create a new instance of JWTAuthHandler delegating to the given (non-null) instance of JWTAuthHandler.
    • JWTAuthHandler

      public JWTAuthHandler(Object delegate)
  • Method Details

    • accept

      public void accept(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      accept in interface AuthenticationHandler
      Specified by:
      accept in interface Consumer<RoutingContext>
    • handle

      public void handle(RoutingContext item)
      Handle an item. This method is generated from the original method."
      Specified by:
      handle in interface AuthenticationHandler
      Specified by:
      handle in interface io.vertx.core.Handler<RoutingContext>
    • getDelegate

      public io.vertx.ext.web.handler.JWTAuthHandler getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface AuthenticationHandler
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • 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
      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(io.vertx.ext.web.handler.JWTAuthHandler delegate)
      Creates a new instance of the JWTAuthHandler.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object