Class: DocusignDtr::Auth::Base
- Inherits:
- 
      Object
      
        - Object
- DocusignDtr::Auth::Base
 
- Includes:
- HTTParty
- Defined in:
- lib/docusign_dtr/auth/base.rb
Instance Attribute Summary collapse
- 
  
    
      #config  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute config. 
- 
  
    
      #token_response  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute token_response. 
Instance Method Summary collapse
- #grant_url ⇒ Object
- 
  
    
      #initialize  ⇒ Base 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Base. 
- #parse_url_response(url) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
| 10 11 12 | # File 'lib/docusign_dtr/auth/base.rb', line 10 def initialize @config = DocusignDtr::Models::AuthConfig.new end | 
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
| 8 9 10 | # File 'lib/docusign_dtr/auth/base.rb', line 8 def config @config end | 
#token_response ⇒ Object
Returns the value of attribute token_response.
| 8 9 10 | # File 'lib/docusign_dtr/auth/base.rb', line 8 def token_response @token_response end | 
Instance Method Details
#grant_url ⇒ Object
| 14 15 16 17 18 | # File 'lib/docusign_dtr/auth/base.rb', line 14 def grant_url grant_uri = URI("#{base_uri}oauth/auth") grant_uri.query = URI.encode_www_form(grant_params) grant_uri.to_s end | 
#parse_url_response(url) ⇒ Object
| 20 21 22 23 24 | # File 'lib/docusign_dtr/auth/base.rb', line 20 def parse_url_response(url) params = URI.decode_www_form(URI(url).query) hash = Hash[*params.flatten] OpenStruct.new(hash) # rubocop:disable Style/OpenStructUse end |