Class: Signnow::Authentications::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/signnow/authentications/base.rb

Direct Known Subclasses

Oauth

Class Method Summary collapse

Class Method Details

.authenticate(attributes = {}) ⇒ Array

Retrieves an oauth token from the Signnow API

Parameters:

  • attributes (Hash) (defaults to: {})

    Attributes to pass to the API

Returns:

  • (Array)

    The available objects



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/signnow/authentications/base.rb', line 9

def authenticate(attributes = {})
  response = Signnow.request(
    :post,
    nil,
    self.api_authenticate_url,
    attributes_for_authentication(attributes),
    options_for_authentication.merge(
      use_form_data: true
    )
  )
  self.new(response)
end