Skip to content

1.2.3 JWTGenerator

Anders Mikkelsen edited this page Dec 21, 2017 · 3 revisions

JWTGenerator

This class is used for accepting external tokens for conversion and for the typical Oauth Flow.

OAuth:

returnAuthUrl expects a path parameter called :provider, e.g. google.

public void returnAuthUrl(RoutingContext routingContext) { ... }
public void handle(RoutingContext routingContext) { ... }

Direct Conversion:

This expects two headers set:

  • Authorization (The actual Token, prepended with "Bearer ")
  • X-Authorization-Provider (Caps Provider, e.g. GOOGLE)
public void directAuth(RoutingContext routingContext) { ... }

Refreshing Tokens:

This expects the token in the Authorization Header, prepended with "Bearer ".

public void refreshFromHttp(RoutingContext routingContext) { ... }
Clone this wiki locally