Sha256: 2f7b6591cc98a6b398da23fb37243b7ad02b54aaaf0b0a6aea199aa5f685da4f
Contents?: true
Size: 650 Bytes
Versions: 7
Compression:
Stored size: 650 Bytes
Contents
module Docusigner class Oauth2 < Docusigner::Base singleton class << self def token(username, password, integrator_key) @headers = { "Accept" => "application/json", "Content-Type" => "application/x-www-form-urlencoded" } body = "grant_type=password&client_id=#{integrator_key}&username=#{username}&password=#{password}&scope=api" resp = post(:token, {}, body) format.decode(resp.body)["access_token"] end def revoke(token) @headers = { "Authorization" => "Bearer #{token}" } post(:revoke, {}, "") end end end end
Version data entries
7 entries across 7 versions & 1 rubygems