Sha256: 6a44e4554d9637c84a6e9fc9eaf26f6ef3b920f76f2e65a33171ae6b07f873d9
Contents?: true
Size: 701 Bytes
Versions: 14
Compression:
Stored size: 701 Bytes
Contents
module RDStation class Authorization attr_reader :refresh_token attr_accessor :access_token, :access_token_expires_in def initialize(access_token:, refresh_token: nil, access_token_expires_in: nil) @access_token = access_token @refresh_token = refresh_token @access_token_expires_in = access_token_expires_in validate_access_token access_token end def headers { "Authorization" => "Bearer #{@access_token}", "Content-Type" => "application/json" } end private def validate_access_token(access_token) access_token_msg = ':access_token is required' raise ArgumentError, access_token_msg unless access_token end end end
Version data entries
14 entries across 14 versions & 1 rubygems