authentic-rb 1.0.2 → 1.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 +4 -4
- data/lib/authentic/key_manager.rb +8 -4
- metadata +4 -10
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4da4fb4072813958676f2d062811807a58cdc88b862376a59f75183f61a35e6f
         | 
| 4 | 
            +
              data.tar.gz: 7644c4358c57624e71192da4fa1933aa62f3e767b02c48ebbec34228b36e5b2e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f4fc75816556fab4961449ce1b493f8e870ca386e5fd4bbfabc816c7929991bb7880187f775d90eb1a7dd3df6f8d6af693a30b978812bf6228ad87cdb4c24d67
         | 
| 7 | 
            +
              data.tar.gz: 22fe20a7078d98ecc7b0e9389d6e97106ccf1bbc1d5f797e5388d519d92892d1a2432da36f5547c3ae9079152f874958d19a81c4153c82e8012c0a5ce444eeb9
         | 
| @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            # frozen_string_literal: true
         | 
| 2 2 |  | 
| 3 3 | 
             
            require 'json/jwt'
         | 
| 4 | 
            -
            require ' | 
| 4 | 
            +
            require 'rest-client'
         | 
| 5 5 | 
             
            require 'uri'
         | 
| 6 6 | 
             
            require 'authentic/key_store'
         | 
| 7 7 |  | 
| @@ -56,10 +56,14 @@ module Authentic | |
| 56 56 | 
             
                #
         | 
| 57 57 | 
             
                # Returns JSON.
         | 
| 58 58 | 
             
                def json_req(uri)
         | 
| 59 | 
            -
                   | 
| 60 | 
            -
             | 
| 59 | 
            +
                  begin
         | 
| 60 | 
            +
                    resp = RestClient.get(uri, accept: :json)
         | 
| 61 | 
            +
                  rescue RestClient::ExceptionWithResponse => e
         | 
| 62 | 
            +
                    code = e.response.code
         | 
| 63 | 
            +
                    raise RequestError.new("failed to retrieve JWK, status #{code}", code)
         | 
| 64 | 
            +
                  end
         | 
| 61 65 |  | 
| 62 | 
            -
                  resp.body
         | 
| 66 | 
            +
                  JSON.parse resp.body
         | 
| 63 67 | 
             
                end
         | 
| 64 68 |  | 
| 65 69 | 
             
                # Internal: hydrates JWK cache.
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: authentic-rb
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Articulate
         | 
| @@ -32,25 +32,19 @@ dependencies: | |
| 32 32 | 
             
                  - !ruby/object:Gem::Version
         | 
| 33 33 | 
             
                    version: 1.9.4
         | 
| 34 34 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 35 | 
            -
              name:  | 
| 35 | 
            +
              name: rest-client
         | 
| 36 36 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 37 37 | 
             
                requirements:
         | 
| 38 38 | 
             
                - - ">="
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            -
                    version:  | 
| 41 | 
            -
                - - "~>"
         | 
| 42 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 43 | 
            -
                    version: 1.1.2
         | 
| 40 | 
            +
                    version: '2.0'
         | 
| 44 41 | 
             
              type: :runtime
         | 
| 45 42 | 
             
              prerelease: false
         | 
| 46 43 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 47 44 | 
             
                requirements:
         | 
| 48 45 | 
             
                - - ">="
         | 
| 49 46 | 
             
                  - !ruby/object:Gem::Version
         | 
| 50 | 
            -
                    version:  | 
| 51 | 
            -
                - - "~>"
         | 
| 52 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 53 | 
            -
                    version: 1.1.2
         | 
| 47 | 
            +
                    version: '2.0'
         | 
| 54 48 | 
             
            description: Ruby toolkit for Auth0 API https://auth0.com.
         | 
| 55 49 | 
             
            email: 
         | 
| 56 50 | 
             
            executables: []
         |