Phraseanet PHP SDK API
Class

PhraseanetSDK\OAuth2Connector

class OAuth2Connector

Constants

TOKEN_ENDPOINT

AUTH_ENDPOINT

GRANT_TYPE_AUTHORIZATION

Oauth authorization grant type

Methods

__construct(GuzzleAdapter $adapter, $clientId, $secret)

string getAuthorizationUrl(string $redirectUri, array $parameters = array(), array $scopes = array())

Builds the Authorization Url

Client retrieveAccessToken($code, $redirectUri)

Retrieves your access Token from your callback endpoint

Details

at line 24
public __construct(GuzzleAdapter $adapter, $clientId, $secret)

Parameters

GuzzleAdapter $adapter
$clientId
$secret

at line 47
public string getAuthorizationUrl(string $redirectUri, array $parameters = array(), array $scopes = array())

Builds the Authorization Url

Parameters

string $redirectUri
array $parameters
array $scopes

Return Value

string

at line 69
public Client retrieveAccessToken($code, $redirectUri)

Retrieves your access Token from your callback endpoint

Parameters

$code
$redirectUri

Return Value

Client

Exceptions

AuthenticationException if error occurs during authentication
TransportException if problem occurs with transport layer