new OAuth2Auth()
Methods
-
api(method, path, params, handler) → {OAuth2Auth}
-
Call OAuth2 APIs.
Parameters:
Name Type Description methodObject HttpMethod pathstring target path paramsObject parameters handlerfunction handler Returns:
self- Type
- OAuth2Auth
-
authorizeURL(params) → {string}
-
Generate a redirect URL to the authN/Z backend. It only applies to auth_code flow.
Parameters:
Name Type Description paramsObject Returns:
- Type
- string
-
getToken(params, handler)
-
Returns the Access Token object.
Parameters:
Name Type Description paramsObject JSON with the options, each flow requires different options. handlerfunction The handler returning the results.