Class JWTAuth

  • All Implemented Interfaces:
    io.vertx.lang.rx.RxDelegate

    public class JWTAuth
    extends AuthenticationProvider
    implements io.vertx.lang.rx.RxDelegate
    Factory interface for creating JWT based AuthenticationProvider instances.

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

    • Field Detail

      • __TYPE_ARG

        public static final io.vertx.lang.rx.TypeArg<JWTAuth> __TYPE_ARG
    • Constructor Detail

      • JWTAuth

        public JWTAuth​(JWTAuth delegate)
      • JWTAuth

        public JWTAuth​(Object delegate)
    • Method Detail

      • create

        public static JWTAuth create​(Vertx vertx,
                                     JWTAuthOptions config)
        Create a JWT auth provider
        Parameters:
        vertx - the Vertx instance
        config - the config
        Returns:
        the auth provider
      • generateToken

        public String generateToken​(JsonObject claims,
                                    JWTOptions options)
        Generate a new JWT token.
        Parameters:
        claims - Json with user defined claims for a list of official claims
        options - extra options for the generation
        Returns:
        JWT encoded token
      • generateToken

        public String generateToken​(JsonObject claims)
        Generate a new JWT token.
        Parameters:
        claims - Json with user defined claims for a list of official claims
        Returns:
        JWT encoded token