OAuth2TokenTrait
Trait OAuth2TokenTraitTest
Tags
Table of Contents
- getNewOAuth2Token() : AuthToken
- Get new authorization token from API using given credentials
Methods
getNewOAuth2Token()
Get new authorization token from API using given credentials
public
getNewOAuth2Token(string $tokenEndpoint, string $clientId, string $clientSecret[, string $grantType = 'client_credentials' ][, bool $useHttpBasic = false ]) : AuthToken
Parameters
- $tokenEndpoint : string
-
URL of token endpoint
- $clientId : string
-
Client id
- $clientSecret : string
-
Client secret
- $grantType : string = 'client_credentials'
-
Grant type (usually 'client_credentials')
- $useHttpBasic : bool = false
-
Use HTTP Basic authorization for getting token