Module ngx-oauth.oauth2
Module for OAuth 2.0 authorization.
Functions
authorization_url (conf, state) | Builds an authorization URL for initiation of the authorization code flow. |
request_token (grant_type, conf, value) | Requests an access token from the authorization server. |
Functions
- authorization_url (conf, state)
-
Builds an authorization URL for initiation of the authorization code flow.
Parameters:
- conf table The configuration (see ngx-oauth.config).
- state optional string The state parameter.
Returns:
-
string
An URL.
- request_token (grant_type, conf, value)
-
Requests an access token from the authorization server.
Parameters:
- grant_type
string
The authorization grant to use;
authorization_code
,refresh_token
, orclient_credentials
. - conf table The configuration (see ngx-oauth.config).
- value
string
The authorization code, refresh token, or nil; depends
on the
grant_type
.
Returns:
- grant_type
string
The authorization grant to use;