Class: OAuth2Auth

vertx-auth-oauth2-js/o_auth2_auth~ OAuth2Auth

new OAuth2Auth()

Source:

Methods

authorizeURL(params) → {string}

Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
Parameters:
Name Type Description
params Object
Source:
Returns:
Type
string

decodeToken(token, handler) → {OAuth2Auth}

Decode a token to a AccessToken object. This is useful to handle bearer JWT tokens.
Parameters:
Name Type Description
token string the access token (base64 string)
handler function A handler to receive the event
Source:
Returns:
self
Type
OAuth2Auth

getFlowType() → {Object}

Returns the configured flow type for the Oauth2 provider.
Source:
Returns:
the flow type.
Type
Object

introspectToken(token, tokenType, handler) → {OAuth2Auth}

Query an OAuth 2.0 authorization server to determine the active state of an OAuth 2.0 token and to determine meta-information about this token.
Parameters:
Name Type Description
token string the access token (base64 string)
tokenType string hint to the token type e.g.: `access_token`
handler function A handler to receive the event
Source:
Returns:
self
Type
OAuth2Auth

loadJWK(handler) → {OAuth2Auth}

Loads a JWK Set from the remote provider. When calling this method several times, the loaded JWKs are updated in the underlying JWT object.
Parameters:
Name Type Description
handler function
Source:
Returns:
Type
OAuth2Auth

rbacHandler(rbac) → {OAuth2Auth}

Parameters:
Name Type Description
rbac OAuth2RBAC
Source:
Returns:
Type
OAuth2Auth