You are here

public function Authentication::authorize_with_accesstoken in Auth0 Single Sign On 8.2

Authorize using an access token

@codeCoverageIgnore - Deprecated

Parameters

string $access_token:

string $connection:

string $scope:

array $additional_params:

Return value

mixed

Deprecated

5.1.1, disabled by default for new tenants as of 8 June 2017. Open the browser to do social authentication instead, which is what Google and Facebook are recommending.

See also

https://auth0.com/docs/api/authentication#social-with-provider-s-access-...

https://developers.googleblog.com/2016/08/modernizing-oauth-interactions...

https://auth0.com/docs/api-auth/intro

File

vendor/auth0/auth0-php/src/API/Authentication.php, line 750

Class

Authentication
Class Authentication

Namespace

Auth0\SDK\API

Code

public function authorize_with_accesstoken($access_token, $connection, $scope = 'openid', array $additional_params = []) {
  $data = array_merge($additional_params, [
    'client_id' => $this->client_id,
    'access_token' => $access_token,
    'connection' => $connection,
    'scope' => $scope,
  ]);
  return $this->apiClient
    ->method('post')
    ->addPath('oauth')
    ->addPath('access_token')
    ->withBody(json_encode($data))
    ->call();
}