createAccessToken() public method

This belongs in a separate factory, but to keep it simple, I'm just keeping it here.
See also: http://tools.ietf.org/html/draft-ietf-oauth-v2-20#section-5
public createAccessToken ( OAuth2\Model\IOAuth2Client $client, mixed $data, string | null $scope = null, integer | null $access_token_lifetime = null, boolean $issue_refresh_token = true, integer | null $refresh_token_lifetime = null ) : array
$client OAuth2\Model\IOAuth2Client
$data mixed
$scope string | null
$access_token_lifetime integer | null How long the access token should live in seconds
$issue_refresh_token boolean Issue a refresh tokeniIf true and the storage mechanism supports it
$refresh_token_lifetime integer | null How long the refresh token should life in seconds
return array
Esempio n. 1
-1
 public function testUse()
 {
     $client = $this->storage->getClient(1);
     $access_token = $this->oauth2->createAccessToken($client, array());
     $a = $this->oauth2->verifyAccessToken($access_token['access_token']);
     $this->assertInstanceOf('\\ebussola\\oauth\\AccessToken', $a);
 }