Factory interface for creating OAuth2 based io.vertx.ext.auth.AuthProvider instances.

  • OAuth2Auth
    • AuthProvider
      • Basic
        • Identifiable
        • Object
          • Anything

no subtypes hierarchy

OAuth2Auth(OAuth2Auth unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
apishared default OAuth2Auth api(HttpMethod method, String path, Object params, Anything(Throwable|Object) handler)

Call OAuth2 APIs.

  • method


  • path

    target path

  • params


  • handler


authorizeURLshared default String authorizeURL(Object params)

Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.

getTokenshared default void getToken(Object params, Anything(Throwable|AccessToken) handler)

Returns the Access Token object.

  • params
    • JSON with the options, each flow requires different options.
  • handler
    • The handler returning the results.
hasJWTTokenshared default Boolean hasJWTToken()

Returns true if this provider supports JWT tokens as the access_token. This is typically true if the provider implements the openid-connect protocol. This is a plain return from the config option jwtToken, which is false by default.

This information is important to validate grants. Since pure OAuth2 should be used for authorization and when a token is requested all grants should be declared, in case of openid-connect this is not true. OpenId will issue a token and all grants will be encoded on the token itself so the requester does not need to list the required grants.

Inherited Methods
Methods inherited from: AuthProvider
Methods inherited from: Object