Skip to content

OAuth2GrantTypes

Troy Willmot edited this page Oct 21, 2016 · 1 revision

Summary

Provides string constants for OAuth 2 grant types supported by this library. The value of the constant is the appropriate string to use within an OAuth 2 request.

Constants

AuthorizationCode

Used with the normal OAuth 2 authentication flow. Requests an authorization code which is swapped for an access token. See https://tools.ietf.org/html/rfc6749#section-4.2 for details of this authentication flow.

ClientCredentials

Used for confidential/authenticated clients, usually when no user is involved (systems integration). This authentication flow does not use an authorization code and authenticates directly to the token endpoint. See https://tools.ietf.org/html/rfc6749#section-4.4 for details of this authentication flow.

RefreshToken

Used when requesting an new access token using a previously provided refresh token. Typically this grant type is used by the library itself and this value is not needed directly by application code. See https://tools.ietf.org/html/rfc6749#page-47 for details of how refresh tokens work.

Password

Used for the "Resource Owner Password Credentials Grant" authentication flow, where a password is used to authenticate. See https://tools.ietf.org/html/rfc6749#section-4.3 for details of this authentication flow.

Clone this wiki locally