public function getAccessToken($oauth_token)
    {
        $accessToken = $this->em->getRepository('OAuth2ServerBundle:AccessToken')->find($oauth_token);

        if (!$accessToken) {
            return null;
        }

        // Get Client
        $client = $accessToken->getClient();

        return array(
            'client_id' => $client->getClientId(),
            'user_id' => $accessToken->getUserId(),
            'expires' => $accessToken->getExpires()->getTimestamp(),
            'scope' => $accessToken->getScope()
        );
    }
public function getAccessToken($oauth_token)
    {
        $accessToken = $this->em->getRepository('OAuth2ServerBundle:AccessToken')->find($oauth_token);

        if (!$accessToken) {
            return null;
        }

        // Get Client
        $client = $accessToken->getClient();

        return array(
            'client_id' => $client->getClientId(),
            'user_id' => $accessToken->getUserId(),
            'expires' => $accessToken->getExpires()->getTimestamp(),
            'scope' => $accessToken->getScope()
        );
    }
public function getAccessToken ( $ oauth_token ) { $ accessToken = $ this -> em -> getRepository ( 'OAuth2ServerBundle:AccessToken' ) -> find ( $ oauth_token ) ; if ( ! $ accessToken ) { return null ; } // Get Client $ client = $ accessToken -> getClient ( ) ; return array ( 'client_id' => $ client -> getClientId ( ) , 'user_id' => $ accessToken -> getUserId ( ) , 'expires' => $ accessToken -> getExpires ( ) -> getTimestamp ( ) , 'scope' => $ accessToken -> getScope ( ) ) ; }
Look up the supplied oauth_token from storage.

We need to retrieve access token data as we create and verify tokens.

@param $oauth_token
oauth_token to be check with.

@return
An associative array as below, and return NULL if the supplied oauth_token
is invalid:
- client_id: Stored client identifier.
- expires: Stored expiration in unix timestamp.
- scope: (optional) Stored scope values in space-separated string.

@ingroup oauth2_section_7
Look up the supplied oauth_token from storage .