Class: Zype::Oauth

Inherits:
BaseModel show all
Defined in:
lib/zype/models/oauth.rb

Overview

Read more at docs.zype.com/v1.0/reference#oauth-1 This class only supports create and status methods

To use this class, you must set ‘login_host`

Since:

  • 0.19.0

Constant Summary

Constants inherited from BaseModel

BaseModel::ACCEPTED_KEYS

Instance Attribute Summary

Attributes inherited from BaseModel

#client

Instance Method Summary collapse

Methods inherited from BaseModel

#all, #auth=, #create, #delete, #find, #initialize, #update

Constructor Details

This class inherits a constructor from Zype::BaseModel

Instance Method Details

#status(access_token:) ⇒ Hash

Check the status of the current access token

Parameters:

  • access_token (String)

    current access token

Returns:

  • (Hash)

    information about the token. When it expires, etc.

Since:

  • 0.19.0



17
18
19
# File 'lib/zype/models/oauth.rb', line 17

def status(access_token:)
  client.execute(method: :get, path: "/#{path}/info", params: { access_token: access_token })
end