new OAuth2Auth()
Methods
-
api(method, path, params, handler) → {OAuth2Auth}
-
Call OAuth2 APIs.
Parameters:
Name Type Description method
Object HttpMethod path
string target path params
Object parameters handler
function 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 params
Object Returns:
- Type
- string
-
getToken(params, handler)
-
Returns the Access Token object.
Parameters:
Name Type Description params
Object JSON with the options, each flow requires different options. handler
function The handler returning the results.