An auth handler that provides JWT Authentication support.

no subtypes hierarchy

Initializer
JWTAuthHandler(JWTAuthHandler unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
addAuthoritiesshared actual default AuthHandler addAuthorities(Set<String> authorities)

Add a set of required authorities for this auth handler

Parameters:
  • authorities

    the set of authorities

addAuthorityshared actual default AuthHandler addAuthority(String authority)

Add a required authority for this auth handler

Parameters:
  • authority

    the authority

authorizeshared actual default void authorize(User user, Anything(Throwable?) handler)

Authorizes the given user against all added authorities.

Parameters:
  • user

    a user.

  • handler

    the handler for the result.

handleshared actual default void handle(RoutingContext arg0)
parseCredentialsshared actual default void parseCredentials(RoutingContext context, Anything(Throwable|Object) handler)

Parses the credentials from the request into a JsonObject. The implementation should be able to extract the required info for the auth provider in the format the provider expects.

Parameters:
  • context

    the routing context

  • handler

    the handler to be called once the information is available.

setAudienceshared default JWTAuthHandler setAudience(List<String> audience)

Set the audience list

Parameters:
  • audience

    the audience list

setIgnoreExpirationshared default JWTAuthHandler setIgnoreExpiration(Boolean ignoreExpiration)

Set whether expiration is ignored

Parameters:
  • ignoreExpiration

    whether expiration is ignored

setIssuershared default JWTAuthHandler setIssuer(String issuer)

Set the issuer

Parameters:
  • issuer

    the issuer

Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: AuthHandler