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:

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, or client_credentials.
  • conf table The configuration (see ngx-oauth.config).
  • value string The authorization code, refresh token, or nil; depends on the grant_type.

Returns:

    Either Right with parsed token response as a table, or Left with an error message.
generated by LDoc 1.4.3