Authorization

Exchanges authentication credentials for access tokens.

OAuth 2.0 allows for the secure retrieval of resources while protecting user credentials. Viafoura provides an authentication service which is OAuth 2.0 compliant.

To use OAuth 2.0 authentication with Viafoura, the following must occur:

  1. Obtain a temporary access token by requesting authorization with our OAuth 2.0 compliant server.
  2. Request a protected resource using the aforementioned access token.
  3. The resource server will verify the access token before providing the resource.

The token produced is encoded as a JSON Web Token and it is valid for 5 minutes

If the access token has expired, an error will return when requesting the protected resource, and a new access token must be requested.

post/authorize_client

Request

  • Base URL
    https://auth.viafoura.co
  • URL
    https://auth.viafoura.co/authorize_client
  • Auth
    HTTP basic

Request body application/x-www-form-urlencoded

grant_typestring required

Type of access to be granted in the token. It must always be client_credentials.

scopestring uuid required

The UUID of the site for which the access token should be generated.

Response

An object containing the provided access token, encoded as JWT.

access_tokenstring

The access token as JWT.

clientstring uuid

The UUID of the client for which the token was generated.

grant_typestring

The type of access granted in the token.

authnamestring

Name of the client for which the token was generated.

status_codeinteger

Service generated status code.

status_messagestring

Additional information about returned result.

Changes

No recorded changes to this operation across all 1 revision of this API.