class Simplify::Authentication
Holds Authentication
information used when accessing the API
Attributes
access_token[RW]
OAuth token used to access the API.
private_key[RW]
Private key used to access the API.
public_key[RW]
Public key used to access the API.
Public Class Methods
new(options = {})
click to toggle source
Creates an Authentication
object.
- options
-
hash containing information to initialise the object. Valid options are :public_key, :private_key and :access_token.
If no value for public_key
is passed or the value is nil then Simplify::public_key
is used. If no value for private_key
is passed or the value is nil then Simplify::private_key
is used.
# File lib/simplify/authentication.rb, line 48 def initialize(options = {}) @public_key = options[:public_key] if @public_key == nil @public_key = Simplify::public_key end @private_key = options[:private_key] if private_key == nil @private_key = Simplify::private_key end @access_token = options[:access_token] end