src/Synapse/OAuth2/OAuthController.php
protected function expireRefreshToken($refreshToken, $user)
    {
        $token = $this->refreshTokenMapper->findBy([
            'refresh_token' => $refreshToken,
            'user_id'       => $user->getId(),
        ]);

        if (! $token) {
            throw new OutOfBoundsException('Refresh token not found.');
        }

        $token->setExpires(date("Y-m-d H:i:s", time()));

        $this->refreshTokenMapper->update($token);
    }
protected function expireRefreshToken($refreshToken, $user)
    {
        $token = $this->refreshTokenMapper->findBy([
            'refresh_token' => $refreshToken,
            'user_id'       => $user->getId(),
        ]);

        if (! $token) {
            throw new OutOfBoundsException('Refresh token not found.');
        }

        $token->setExpires(date("Y-m-d H:i:s", time()));

        $this->refreshTokenMapper->update($token);
    }
protected function expireRefreshToken ( $ refreshToken , $ user ) { $ token = $ this -> refreshTokenMapper -> findBy ( [ 'refresh_token' => $ refreshToken , 'user_id' => $ user -> getId ( ) , ] ) ; if ( ! $ token ) { throw new OutOfBoundsException ( 'Refresh token not found.' ) ; } $ token -> setExpires ( date ( "Y-m-d H:i:s" , time ( ) ) ) ; $ this -> refreshTokenMapper -> update ( $ token ) ; }
Expire a refresh token

@param  string     $refreshToken
@param  UserEntity $user
Expire a refresh token