public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, $client_id, $user_id, $scope)
 {
     /*
      * Client Credentials Grant does NOT include a refresh token
      * @see http://tools.ietf.org/html/rfc6749#section-4.4.3
      */
     $includeRefreshToken = false;
     return $accessToken->createAccessToken($client_id, $user_id, $scope, $includeRefreshToken);
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, array $clientData, array $tokenData)
 {
     /*
      * Client Credentials Grant does NOT include a refresh token
      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.4.3
      */
     $includeRefreshToken = false;
     return $accessToken->createAccessToken($clientData['client_id'], $tokenData['user_id'], $tokenData['scope'], $includeRefreshToken);
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, $client_id, $user_id, $scope)
 {
     /*
      * It is optional to force a new refresh token when a refresh token is used.
      * However, if a new refresh token is issued, the old one MUST be expired
      * @see http://tools.ietf.org/html/rfc6749#section-6
      */
     $issueNewRefreshToken = $this->config['always_issue_new_refresh_token'];
     $token = $accessToken->createAccessToken($client_id, $user_id, $scope, $issueNewRefreshToken);
     if ($issueNewRefreshToken) {
         $this->storage->unsetRefreshToken($this->refreshToken['refresh_token']);
     }
     return $token;
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, array $clientData, array $tokenData)
 {
     /*
      * It is optional to force a new refresh token when a refresh token is used.
      * However, if a new refresh token is issued, the old one MUST be expired
      * @see http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-6
      */
     $issueNewRefreshToken = $this->config['always_issue_new_refresh_token'];
     $token = $accessToken->createAccessToken($clientData['client_id'], $tokenData['user_id'], $tokenData['scope'], $issueNewRefreshToken);
     if ($issueNewRefreshToken) {
         $this->storage->unsetRefreshToken($this->oldRefreshToken);
     }
     return $token;
 }
 /**
  * Creates an access token that is NOT associated with a refresh token.
  * If a subject (sub) the name of the user/account we are accessing data on behalf of.
  *
  * @see OAuth2_GrantTypeInterface::createAccessToken()
  */
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, $client_id, $user_id, $scope)
 {
     $includeRefreshToken = false;
     return $accessToken->createAccessToken($client_id, $user_id, $scope, $includeRefreshToken);
 }
 public function createAccessToken(\OAuth2_ResponseType_AccessTokenInterface $accessToken, $client_id, $user_id, $scope)
 {
     return $accessToken->createAccessToken($client_id, $user_id, $scope);
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, $client_id, $user_id, $scope)
 {
     $token = $accessToken->createAccessToken($client_id, $user_id, $scope);
     $this->storage->expireAuthorizationCode($this->authCode['code']);
     return $token;
 }
Esempio n. 8
0
 /**
  * Creates an access token that is NOT associated with a refresh token.
  * If a subject (sub) the name of the user/account we are accessing data on behalf of.
  * @see OAuth2_GrantTypeInterface::createAccessToken()
  */
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, array $clientData, array $tokenData)
 {
     $includeRefreshToken = false;
     return $accessToken->createAccessToken($clientData['client_id'], $tokenData['sub'], $tokenData['scope'], $includeRefreshToken);
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, array $clientData, array $tokenData)
 {
     $this->storage->expireAuthorizationCode($this->code);
     $token = $accessToken->createAccessToken($clientData['client_id'], $tokenData['user_id'], $tokenData['scope']);
     return $token;
 }
 public function createAccessToken(OAuth2_ResponseType_AccessTokenInterface $accessToken, array $clientData, array $tokenData)
 {
     return $accessToken->createAccessToken($clientData['client_id'], $tokenData['user_id'], $tokenData['scope']);
 }