Auth0\SDK\API\Authentication::get_access_token PHP Method

get_access_token() public method

public get_access_token ( )
    public function get_access_token()
    {
        return $this->access_token;
    }

Usage Example

示例#1
0
 public function testOauthToken()
 {
     $env = $this->getEnv();
     $api = new Authentication($env['DOMAIN'], $env['GLOBAL_CLIENT_ID'], $env['GLOBAL_CLIENT_SECRET']);
     $token = $api->get_access_token();
     $this->assertArrayHasKey('access_token', $token);
     $this->assertArrayHasKey('token_type', $token);
     $this->assertEquals('bearer', strtolower($token['token_type']));
 }