public function userCredentials(array $data = [])
    {

        $data = $this->mergeData($data);

        $refreshCredentials = new OAuth2TokenBuilder();

        return $refreshCredentials->withClientId($data['clientId'])
            ->withClientSecret($data['clientSecret'])
            ->withRefreshToken($data['refreshToken'])
            ->build();
    }
public function userCredentials(array $data = [])
    {

        $data = $this->mergeData($data);

        $refreshCredentials = new OAuth2TokenBuilder();

        return $refreshCredentials->withClientId($data['clientId'])
            ->withClientSecret($data['clientSecret'])
            ->withRefreshToken($data['refreshToken'])
            ->build();
    }
public function userCredentials ( array $ data = [ ] ) { $ data = $ this -> mergeData ( $ data ) ; $ refreshCredentials = new OAuth2TokenBuilder ( ) ; return $ refreshCredentials -> withClientId ( $ data [ 'clientId' ] ) -> withClientSecret ( $ data [ 'clientSecret' ] ) -> withRefreshToken ( $ data [ 'refreshToken' ] ) -> build ( ) ; }
UserRefreshCredentials
Generate a refreshable OAuth2 credential for authentication.

Parameters:
$data: [$clientId => '',$clientSecret => '',$refreshToken => '']

@param array $data
@return \Google\Auth\Credentials\UserRefreshCredentials
UserRefreshCredentials Generate a refreshable OAuth2 credential for authentication .