authinator 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b3d82624397aabd4fc7fb6b6b851dd6537779d39
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ff45303cba2e2fc51ccc166bc9ad4fb694d3a7d3
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: cf8e1d9e08b9eb1b3e3532b3366975f3f070111cc5de18b30cc61ee45e4bbb5c351a540c5ab9b560376519647b4abb1e207588d4c8bef0b57e3ad11141a117bf
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 4bca86ce9fa8a423bf222e7759f7e56b62a0a5800497e24a261e9795124f3067e62f0a24aa900170408a7856a289ab01a59918c59727e4b76e95335ee53c7fbd
         
     | 
| 
         @@ -62,9 +62,9 @@ module Authinator 
     | 
|
| 
       62 
62 
     | 
    
         
             
              private
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
       64 
64 
     | 
    
         
             
                def build_provider_hash(client_options)
         
     | 
| 
       65 
     | 
    
         
            -
                  @provider_hash = PROVIDER_HASHES[provider]
         
     | 
| 
       66 
     | 
    
         
            -
                  @provider_hash = client_options.delete(:client_id) if client_options[:client_id]
         
     | 
| 
       67 
     | 
    
         
            -
                  @provider_hash = client_options.delete(:client_secret) if client_options[:client_secret]
         
     | 
| 
      
 65 
     | 
    
         
            +
                  @provider_hash = PROVIDER_HASHES[@provider.to_sym]
         
     | 
| 
      
 66 
     | 
    
         
            +
                  @provider_hash[:client_id] = client_options.delete(:client_id) if client_options[:client_id]
         
     | 
| 
      
 67 
     | 
    
         
            +
                  @provider_hash[:client_secret] = client_options.delete(:client_secret) if client_options[:client_secret]
         
     | 
| 
       68 
68 
     | 
    
         
             
                end
         
     | 
| 
       69 
69 
     | 
    
         | 
| 
       70 
70 
     | 
    
         
             
                def exchange_with_google(code)
         
     | 
    
        data/lib/authinator/version.rb
    CHANGED
    
    
| 
         @@ -75,4 +75,13 @@ describe Authinator::AuthCodeExchanger do 
     | 
|
| 
       75 
75 
     | 
    
         
             
                  Authinator::AuthCodeExchanger.new(:some_fake_provider)
         
     | 
| 
       76 
76 
     | 
    
         
             
                end.to raise_error(ArgumentError)
         
     | 
| 
       77 
77 
     | 
    
         
             
              end
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
              it 'should correctly handle client information provided as a parameter' do
         
     | 
| 
      
 80 
     | 
    
         
            +
                ace = Authinator::AuthCodeExchanger.new(:google, client_id: 'new_id', client_secret: 'new_secret')
         
     | 
| 
      
 81 
     | 
    
         
            +
             
     | 
| 
      
 82 
     | 
    
         
            +
                stub_request(:post, ace.site_token_url).
         
     | 
| 
      
 83 
     | 
    
         
            +
                  with(body: @test_env.merge(client_id: 'new_id', client_secret: 'new_secret'),
         
     | 
| 
      
 84 
     | 
    
         
            +
                       headers: @req_headers).
         
     | 
| 
      
 85 
     | 
    
         
            +
                  to_return(@req_response)
         
     | 
| 
      
 86 
     | 
    
         
            +
              end
         
     | 
| 
       78 
87 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: authinator
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Alexander Bradner
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-12-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: oauth2
         
     |