public function getRefreshToken($refresh_token)
    {
        $refreshToken = $this->em->getRepository('OAuth2ServerBundle:RefreshToken')->find($refresh_token);

        if (!$refreshToken) {
            return null;
        }

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

        return array(
            'refresh_token' => $refreshToken->getToken(),
            'client_id' => $client->getClientId(),
            'user_id' => $refreshToken->getUserId(),
            'expires' => $refreshToken->getExpires()->getTimestamp(),
            'scope' => $refreshToken->getScope()
        );
    }
public function getRefreshToken($refresh_token)
    {
        $refreshToken = $this->em->getRepository('OAuth2ServerBundle:RefreshToken')->find($refresh_token);

        if (!$refreshToken) {
            return null;
        }

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

        return array(
            'refresh_token' => $refreshToken->getToken(),
            'client_id' => $client->getClientId(),
            'user_id' => $refreshToken->getUserId(),
            'expires' => $refreshToken->getExpires()->getTimestamp(),
            'scope' => $refreshToken->getScope()
        );
    }
public function getRefreshToken ( $ refresh_token ) { $ refreshToken = $ this -> em -> getRepository ( 'OAuth2ServerBundle:RefreshToken' ) -> find ( $ refresh_token ) ; if ( ! $ refreshToken ) { return null ; } // Get Client $ client = $ refreshToken -> getClient ( ) ; return array ( 'refresh_token' => $ refreshToken -> getToken ( ) , 'client_id' => $ client -> getClientId ( ) , 'user_id' => $ refreshToken -> getUserId ( ) , 'expires' => $ refreshToken -> getExpires ( ) -> getTimestamp ( ) , 'scope' => $ refreshToken -> getScope ( ) ) ; }
Grant refresh access tokens.

Retrieve the stored data for the given refresh token.

Required for OAuth2::GRANT_TYPE_REFRESH_TOKEN.

@param $refresh_token
Refresh token to be check with.

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

@see http://tools.ietf.org/html/rfc6749#section-6

@ingroup oauth2_section_6
Grant refresh access tokens .