Class: Fakturoid::Oauth

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/fakturoid/oauth.rb,
lib/fakturoid/oauth/flow/base.rb,
lib/fakturoid/oauth/credentials.rb,
lib/fakturoid/oauth/request/api.rb,
lib/fakturoid/oauth/request/base.rb,
lib/fakturoid/oauth/request/oauth.rb,
lib/fakturoid/oauth/token_response.rb,
lib/fakturoid/oauth/access_token_service.rb,
lib/fakturoid/oauth/flow/authorization_code.rb,
lib/fakturoid/oauth/flow/client_credentials.rb

Defined Under Namespace

Modules: Flow, Request Classes: AccessTokenService, Credentials, TokenResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Oauth

Returns a new instance of Oauth.



17
18
19
20
21
# File 'lib/fakturoid/oauth.rb', line 17

def initialize(client)
  @client = client
  @flow = find_flow
  @access_token_service = AccessTokenService.new(self)
end

Instance Attribute Details

#access_token_serviceObject (readonly)

Returns the value of attribute access_token_service.



13
14
15
# File 'lib/fakturoid/oauth.rb', line 13

def access_token_service
  @access_token_service
end

#clientObject (readonly)

Returns the value of attribute client.



13
14
15
# File 'lib/fakturoid/oauth.rb', line 13

def client
  @client
end

#flowObject (readonly)

Returns the value of attribute flow.



13
14
15
# File 'lib/fakturoid/oauth.rb', line 13

def flow
  @flow
end

Instance Method Details

#perform_request(method, path, params) ⇒ Object



23
24
25
# File 'lib/fakturoid/oauth.rb', line 23

def perform_request(method, path, params)
  access_token_service.perform_request(method, path, params)
end