You are here

public function Auth0::getAccessToken in Auth0 Single Sign On 8.2

Get access token from persisted session or from a code exchange

Return value

string|null

Throws

ApiException (see self::exchange()).

CoreException (see self::exchange()).

File

vendor/auth0/auth0-php/src/Auth0.php, line 494

Class

Auth0
Class Auth0 Provides access to Auth0 authentication functionality.

Namespace

Auth0\SDK

Code

public function getAccessToken() {
  if (!$this->accessToken) {
    $this
      ->exchange();
  }
  return $this->accessToken;
}