oauth2 0.7.1 → 0.8.0
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.
- data/README.md +33 -28
- data/Rakefile +1 -3
- data/lib/oauth2.rb +2 -0
- data/lib/oauth2/access_token.rb +6 -1
- data/lib/oauth2/client.rb +11 -0
- data/lib/oauth2/response.rb +1 -1
- data/lib/oauth2/strategy/assertion.rb +75 -0
- data/lib/oauth2/strategy/implicit.rb +29 -0
- data/lib/oauth2/version.rb +16 -1
- data/oauth2.gemspec +3 -2
- data/spec/oauth2/client_spec.rb +4 -0
- data/spec/oauth2/strategy/assertion_spec.rb +57 -0
- data/spec/oauth2/strategy/implicit_spec.rb +28 -0
- metadata +174 -155
    
        data/README.md
    CHANGED
    
    | @@ -7,10 +7,10 @@ the entire specification over time. | |
| 7 7 | 
             
            [travis]: http://travis-ci.org/intridea/oauth2
         | 
| 8 8 | 
             
            [gemnasium]: https://gemnasium.com/intridea/oauth2
         | 
| 9 9 |  | 
| 10 | 
            -
            ##  | 
| 10 | 
            +
            ## Installation
         | 
| 11 11 | 
             
                gem install oauth2
         | 
| 12 12 |  | 
| 13 | 
            -
            ##  | 
| 13 | 
            +
            ## Resources
         | 
| 14 14 | 
             
            * [View Source on GitHub][code]
         | 
| 15 15 | 
             
            * [Report Issues on GitHub][issues]
         | 
| 16 16 | 
             
            * [Read More at the Wiki][wiki]
         | 
| @@ -19,7 +19,7 @@ the entire specification over time. | |
| 19 19 | 
             
            [issues]: https://github.com/intridea/oauth2/issues
         | 
| 20 20 | 
             
            [wiki]: https://wiki.github.com/intridea/oauth2
         | 
| 21 21 |  | 
| 22 | 
            -
            ##  | 
| 22 | 
            +
            ## Usage Examples
         | 
| 23 23 | 
             
                require 'oauth2'
         | 
| 24 24 | 
             
                client = OAuth2::Client.new('client_id', 'client_secret', :site => 'https://example.org')
         | 
| 25 25 |  | 
| @@ -31,7 +31,7 @@ the entire specification over time. | |
| 31 31 | 
             
                response.class.name
         | 
| 32 32 | 
             
                # => OAuth2::Response
         | 
| 33 33 |  | 
| 34 | 
            -
            ##  | 
| 34 | 
            +
            ## OAuth2::Response
         | 
| 35 35 | 
             
            The AccessToken methods #get, #post, #put and #delete and the generic #request
         | 
| 36 36 | 
             
            will return an instance of the #OAuth2::Response class.
         | 
| 37 37 |  | 
| @@ -43,13 +43,13 @@ array.  Otherwise, it will return the original body string. | |
| 43 43 | 
             
            The original response body, headers, and status can be accessed via their
         | 
| 44 44 | 
             
            respective methods.
         | 
| 45 45 |  | 
| 46 | 
            -
            ##  | 
| 46 | 
            +
            ## OAuth2::AccessToken
         | 
| 47 47 | 
             
            If you have an existing Access Token for a user, you can initialize an instance
         | 
| 48 48 | 
             
            using various class methods including the standard new, from_hash (if you have
         | 
| 49 49 | 
             
            a hash of the values), or from_kvform (if you have an
         | 
| 50 50 | 
             
            application/x-www-form-urlencoded encoded string of the values).
         | 
| 51 51 |  | 
| 52 | 
            -
            ##  | 
| 52 | 
            +
            ## OAuth2::Error
         | 
| 53 53 | 
             
            On 400+ status code responses, an OAuth2::Error will be raised.  If it is a
         | 
| 54 54 | 
             
            standard OAuth2 error response, the body will be parsed and #code and #description will contain the values provided from the error and
         | 
| 55 55 | 
             
            error_description parameters.  The #response property of OAuth2::Error will
         | 
| @@ -60,18 +60,24 @@ option on initialization of the client.  In this case the OAuth2::Response | |
| 60 60 | 
             
            instance will be returned as usual and on 400+ status code responses, the
         | 
| 61 61 | 
             
            Response instance will contain the OAuth2::Error instance.
         | 
| 62 62 |  | 
| 63 | 
            -
            ##  | 
| 64 | 
            -
            Currently the Authorization Code, Resource Owner Password Credentials,  | 
| 63 | 
            +
            ## Authorization Grants
         | 
| 64 | 
            +
            Currently the Authorization Code, Implicit, Resource Owner Password Credentials, Client Credentials, and Assertion
         | 
| 65 65 | 
             
            authentication grant types have helper strategy classes that simplify client
         | 
| 66 | 
            -
            use.  They are available via the #auth_code, #password, and # | 
| 66 | 
            +
            use.  They are available via the #auth_code, #implicit, #password, #client_credentials, and #assertion methods respectively.
         | 
| 67 67 |  | 
| 68 68 | 
             
                auth_url = client.auth_code.authorize_url(:redirect_uri => 'http://localhost:8080/oauth/callback')
         | 
| 69 69 | 
             
                token = client.auth_code.get_token('code_value', :redirect_uri => 'http://localhost:8080/oauth/callback')
         | 
| 70 70 |  | 
| 71 | 
            +
                auth_url = client.implicit.authorize_url(:redirect_uri => 'http://localhost:8080/oauth/callback')
         | 
| 72 | 
            +
                # get the token params in the callback and
         | 
| 73 | 
            +
                token = OAuth2::AccessToken.from_kvform(client, query_string)
         | 
| 74 | 
            +
             | 
| 71 75 | 
             
                token = client.password.get_token('username', 'password')
         | 
| 72 76 |  | 
| 73 77 | 
             
                token = client.client_credentials.get_token
         | 
| 74 78 |  | 
| 79 | 
            +
                token = client.assertion.get_token(assertion_params)
         | 
| 80 | 
            +
             | 
| 75 81 | 
             
            If you want to specify additional headers to be sent out with the
         | 
| 76 82 | 
             
            request, add a 'headers' hash under 'params':
         | 
| 77 83 |  | 
| @@ -80,24 +86,23 @@ request, add a 'headers' hash under 'params': | |
| 80 86 | 
             
            You can always use the #request method on the OAuth2::Client instance to make
         | 
| 81 87 | 
             
            requests for tokens for any Authentication grant type.
         | 
| 82 88 |  | 
| 83 | 
            -
            ##  | 
| 84 | 
            -
            1. Fork the  | 
| 85 | 
            -
            2. Create a topic branch.
         | 
| 86 | 
            -
            3.  | 
| 87 | 
            -
            4.  | 
| 88 | 
            -
            5.  | 
| 89 | 
            -
            6. Run `bundle exec rake spec`. If your  | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
            8.  | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
            [ | 
| 97 | 
            -
            [ | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
            ## <a name="versions"></a>Supported Ruby Versions
         | 
| 89 | 
            +
            ## Submitting a Pull Request
         | 
| 90 | 
            +
            1. [Fork the repository.][fork]
         | 
| 91 | 
            +
            2. [Create a topic branch.][branch]
         | 
| 92 | 
            +
            3. Add specs for your unimplemented feature or bug fix.
         | 
| 93 | 
            +
            4. Run `bundle exec rake spec`. If your specs pass, return to step 3.
         | 
| 94 | 
            +
            5. Implement your feature or bug fix.
         | 
| 95 | 
            +
            6. Run `bundle exec rake spec`. If your specs fail, return to step 5.
         | 
| 96 | 
            +
            7. Run `open coverage/index.html`. If your changes are not completely covered
         | 
| 97 | 
            +
               by your tests, return to step 3.
         | 
| 98 | 
            +
            8. Add, commit, and push your changes.
         | 
| 99 | 
            +
            9. [Submit a pull request.][pr]
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            [fork]: http://help.github.com/fork-a-repo/
         | 
| 102 | 
            +
            [branch]: http://learn.github.com/p/branching.html
         | 
| 103 | 
            +
            [pr]: http://help.github.com/send-pull-requests/
         | 
| 104 | 
            +
             | 
| 105 | 
            +
            ## Supported Ruby Versions
         | 
| 101 106 | 
             
            This library aims to support and is [tested against][travis] the following Ruby
         | 
| 102 107 | 
             
            implementations:
         | 
| 103 108 |  | 
| @@ -124,7 +129,7 @@ implementation, you will be personally responsible for providing patches in a | |
| 124 129 | 
             
            timely fashion. If critical issues for a particular implementation exist at the
         | 
| 125 130 | 
             
            time of a major release, support for that Ruby version may be dropped.
         | 
| 126 131 |  | 
| 127 | 
            -
            ##  | 
| 132 | 
            +
            ## Copyright
         | 
| 128 133 | 
             
            Copyright (c) 2011 Intridea, Inc. and Michael Bleigh.
         | 
| 129 134 | 
             
            See [LICENSE][] for details.
         | 
| 130 135 | 
             
            [license]: https://github.com/intridea/oauth2/blob/master/LICENSE.md
         | 
    
        data/Rakefile
    CHANGED
    
    | @@ -1,5 +1,3 @@ | |
| 1 | 
            -
            #!/usr/bin/env rake
         | 
| 2 | 
            -
             | 
| 3 1 | 
             
            require 'bundler'
         | 
| 4 2 | 
             
            Bundler::GemHelper.install_tasks
         | 
| 5 3 |  | 
| @@ -14,7 +12,7 @@ namespace :doc do | |
| 14 12 | 
             
              require File.expand_path('../lib/oauth2/version', __FILE__)
         | 
| 15 13 | 
             
              RDoc::Task.new do |rdoc|
         | 
| 16 14 | 
             
                rdoc.rdoc_dir = 'rdoc'
         | 
| 17 | 
            -
                rdoc.title = "oauth2 #{OAuth2:: | 
| 15 | 
            +
                rdoc.title = "oauth2 #{OAuth2::Version}"
         | 
| 18 16 | 
             
                rdoc.main = 'README.md'
         | 
| 19 17 | 
             
                rdoc.rdoc_files.include('README.md', 'LICENSE.md', 'lib/**/*.rb')
         | 
| 20 18 | 
             
              end
         | 
    
        data/lib/oauth2.rb
    CHANGED
    
    | @@ -2,7 +2,9 @@ require 'oauth2/error' | |
| 2 2 | 
             
            require 'oauth2/client'
         | 
| 3 3 | 
             
            require 'oauth2/strategy/base'
         | 
| 4 4 | 
             
            require 'oauth2/strategy/auth_code'
         | 
| 5 | 
            +
            require 'oauth2/strategy/implicit'
         | 
| 5 6 | 
             
            require 'oauth2/strategy/password'
         | 
| 6 7 | 
             
            require 'oauth2/strategy/client_credentials'
         | 
| 8 | 
            +
            require 'oauth2/strategy/assertion'
         | 
| 7 9 | 
             
            require 'oauth2/access_token'
         | 
| 8 10 | 
             
            require 'oauth2/response'
         | 
    
        data/lib/oauth2/access_token.rb
    CHANGED
    
    | @@ -126,12 +126,17 @@ module OAuth2 | |
| 126 126 | 
             
                  request(:delete, path, opts, &block)
         | 
| 127 127 | 
             
                end
         | 
| 128 128 |  | 
| 129 | 
            +
                # Get the headers hash (includes Authorization token)
         | 
| 130 | 
            +
                def headers
         | 
| 131 | 
            +
                  { 'Authorization' => options[:header_format] % token }
         | 
| 132 | 
            +
                end
         | 
| 133 | 
            +
             | 
| 129 134 | 
             
              private
         | 
| 130 135 | 
             
                def set_token(opts)
         | 
| 131 136 | 
             
                  case options[:mode]
         | 
| 132 137 | 
             
                  when :header
         | 
| 133 138 | 
             
                    opts[:headers] ||= {}
         | 
| 134 | 
            -
                    opts[:headers] | 
| 139 | 
            +
                    opts[:headers].merge!(headers)
         | 
| 135 140 | 
             
                  when :query
         | 
| 136 141 | 
             
                    opts[:params] ||= {}
         | 
| 137 142 | 
             
                    opts[:params][options[:param_name]] = token
         | 
    
        data/lib/oauth2/client.rb
    CHANGED
    
    | @@ -140,6 +140,13 @@ module OAuth2 | |
| 140 140 | 
             
                  @auth_code ||= OAuth2::Strategy::AuthCode.new(self)
         | 
| 141 141 | 
             
                end
         | 
| 142 142 |  | 
| 143 | 
            +
                # The Implicit strategy
         | 
| 144 | 
            +
                #
         | 
| 145 | 
            +
                # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-26#section-4.2
         | 
| 146 | 
            +
                def implicit
         | 
| 147 | 
            +
                  @implicit ||= OAuth2::Strategy::Implicit.new(self)
         | 
| 148 | 
            +
                end
         | 
| 149 | 
            +
             | 
| 143 150 | 
             
                # The Resource Owner Password Credentials strategy
         | 
| 144 151 | 
             
                #
         | 
| 145 152 | 
             
                # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-15#section-4.3
         | 
| @@ -153,5 +160,9 @@ module OAuth2 | |
| 153 160 | 
             
                def client_credentials
         | 
| 154 161 | 
             
                  @client_credentials ||= OAuth2::Strategy::ClientCredentials.new(self)
         | 
| 155 162 | 
             
                end
         | 
| 163 | 
            +
             | 
| 164 | 
            +
                def assertion
         | 
| 165 | 
            +
                  @assertion ||= OAuth2::Strategy::Assertion.new(self)
         | 
| 166 | 
            +
                end
         | 
| 156 167 | 
             
              end
         | 
| 157 168 | 
             
            end
         | 
    
        data/lib/oauth2/response.rb
    CHANGED
    
    
| @@ -0,0 +1,75 @@ | |
| 1 | 
            +
            require 'httpauth'
         | 
| 2 | 
            +
            require 'jwt'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module OAuth2
         | 
| 5 | 
            +
              module Strategy
         | 
| 6 | 
            +
                # The Client Assertion Strategy
         | 
| 7 | 
            +
                #
         | 
| 8 | 
            +
                # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-10#section-4.1.3
         | 
| 9 | 
            +
                #
         | 
| 10 | 
            +
                # Sample usage:
         | 
| 11 | 
            +
                #   client = OAuth2::Client.new(client_id, client_secret,
         | 
| 12 | 
            +
                #                               :site => 'http://localhost:8080')
         | 
| 13 | 
            +
                #
         | 
| 14 | 
            +
                #   params = {:hmac_secret => "some secret",
         | 
| 15 | 
            +
                #             # or :private_key => "private key string",
         | 
| 16 | 
            +
                #             :iss => "http://localhost:3001",
         | 
| 17 | 
            +
                #             :prn => "me@here.com",
         | 
| 18 | 
            +
                #             :exp => Time.now.utc.to_i + 3600}
         | 
| 19 | 
            +
                #
         | 
| 20 | 
            +
                #   access = client.assertion.get_token(params)
         | 
| 21 | 
            +
                #   access.token                 # actual access_token string
         | 
| 22 | 
            +
                #   access.get("/api/stuff")     # making api calls with access token in header
         | 
| 23 | 
            +
                #
         | 
| 24 | 
            +
                class Assertion < Base
         | 
| 25 | 
            +
                  # Not used for this strategy
         | 
| 26 | 
            +
                  #
         | 
| 27 | 
            +
                  # @raise [NotImplementedError]
         | 
| 28 | 
            +
                  def authorize_url
         | 
| 29 | 
            +
                    raise NotImplementedError, "The authorization endpoint is not used in this strategy"
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                  # Retrieve an access token given the specified client.
         | 
| 33 | 
            +
                  #
         | 
| 34 | 
            +
                  # @param [Hash] params assertion params
         | 
| 35 | 
            +
                  # pass either :hmac_secret or :private_key, but not both.
         | 
| 36 | 
            +
                  #
         | 
| 37 | 
            +
                  #   params :hmac_secret, secret string.
         | 
| 38 | 
            +
                  #   params :private_key, private key string.
         | 
| 39 | 
            +
                  #
         | 
| 40 | 
            +
                  #   params :iss, issuer
         | 
| 41 | 
            +
                  #   params :aud, audience, optional
         | 
| 42 | 
            +
                  #   params :prn, principal, current user
         | 
| 43 | 
            +
                  #   params :exp, expired at, in seconds, like Time.now.utc.to_i + 3600
         | 
| 44 | 
            +
                  #
         | 
| 45 | 
            +
                  # @param [Hash] opts options
         | 
| 46 | 
            +
                  def get_token(params={}, opts={})
         | 
| 47 | 
            +
                    hash = build_request(params)
         | 
| 48 | 
            +
                    @client.get_token(hash, opts.merge('refresh_token' => nil))
         | 
| 49 | 
            +
                  end
         | 
| 50 | 
            +
             | 
| 51 | 
            +
                  def build_request(params)
         | 
| 52 | 
            +
                    assertion = build_assertion(params)
         | 
| 53 | 
            +
                    {:grant_type     => "assertion", 
         | 
| 54 | 
            +
                     :assertion_type => "urn:ietf:params:oauth:grant-type:jwt-bearer",
         | 
| 55 | 
            +
                     :assertion      => assertion,
         | 
| 56 | 
            +
                     :scope          => params[:scope]
         | 
| 57 | 
            +
                    }.merge(client_params)
         | 
| 58 | 
            +
                  end
         | 
| 59 | 
            +
             | 
| 60 | 
            +
                  def build_assertion(params)
         | 
| 61 | 
            +
                    claims = {:iss => params[:iss],
         | 
| 62 | 
            +
                              :aud => params[:aud],
         | 
| 63 | 
            +
                              :prn => params[:prn],
         | 
| 64 | 
            +
                              :exp => params[:exp]
         | 
| 65 | 
            +
                             }
         | 
| 66 | 
            +
                    if params[:hmac_secret]
         | 
| 67 | 
            +
                      jwt_assertion = JWT.encode(claims, params[:hmac_secret], "HS256")
         | 
| 68 | 
            +
                    elsif params[:private_key]
         | 
| 69 | 
            +
                      jwt_assertion = JWT.encode(claims, params[:private_key], "RS256")
         | 
| 70 | 
            +
                    end
         | 
| 71 | 
            +
                  end
         | 
| 72 | 
            +
                end
         | 
| 73 | 
            +
              end
         | 
| 74 | 
            +
            end
         | 
| 75 | 
            +
             | 
| @@ -0,0 +1,29 @@ | |
| 1 | 
            +
            module OAuth2
         | 
| 2 | 
            +
              module Strategy
         | 
| 3 | 
            +
                # The Implicit Strategy
         | 
| 4 | 
            +
                #
         | 
| 5 | 
            +
                # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-26#section-4.2
         | 
| 6 | 
            +
                class Implicit < Base
         | 
| 7 | 
            +
                  # The required query parameters for the authorize URL
         | 
| 8 | 
            +
                  #
         | 
| 9 | 
            +
                  # @param [Hash] params additional query parameters
         | 
| 10 | 
            +
                  def authorize_params(params={})
         | 
| 11 | 
            +
                    params.merge('response_type' => 'token', 'client_id' => @client.id)
         | 
| 12 | 
            +
                  end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  # The authorization URL endpoint of the provider
         | 
| 15 | 
            +
                  #
         | 
| 16 | 
            +
                  # @param [Hash] params additional query parameters for the URL
         | 
| 17 | 
            +
                  def authorize_url(params={})
         | 
| 18 | 
            +
                    @client.authorize_url(authorize_params.merge(params))
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                  # Not used for this strategy
         | 
| 22 | 
            +
                  #
         | 
| 23 | 
            +
                  # @raise [NotImplementedError]
         | 
| 24 | 
            +
                  def get_token(*)
         | 
| 25 | 
            +
                    raise NotImplementedError, "The token is accessed differently in this strategy"
         | 
| 26 | 
            +
                  end
         | 
| 27 | 
            +
                end
         | 
| 28 | 
            +
              end
         | 
| 29 | 
            +
            end
         | 
    
        data/lib/oauth2/version.rb
    CHANGED
    
    | @@ -1,3 +1,18 @@ | |
| 1 1 | 
             
            module OAuth2
         | 
| 2 | 
            -
               | 
| 2 | 
            +
              class Version
         | 
| 3 | 
            +
                MAJOR = 0 unless defined? MAJOR
         | 
| 4 | 
            +
                MINOR = 8 unless defined? MINOR
         | 
| 5 | 
            +
                PATCH = 0 unless defined? PATCH
         | 
| 6 | 
            +
                PRE = nil unless defined? PRE
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                class << self
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  # @return [String]
         | 
| 11 | 
            +
                  def to_s
         | 
| 12 | 
            +
                    [MAJOR, MINOR, PATCH, PRE].compact.join('.')
         | 
| 13 | 
            +
                  end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              end
         | 
| 3 18 | 
             
            end
         | 
    
        data/oauth2.gemspec
    CHANGED
    
    | @@ -5,7 +5,8 @@ Gem::Specification.new do |gem| | |
| 5 5 | 
             
              gem.add_dependency 'faraday', '~> 0.8'
         | 
| 6 6 | 
             
              gem.add_dependency 'httpauth', '~> 0.1'
         | 
| 7 7 | 
             
              gem.add_dependency 'multi_json', '~> 1.0'
         | 
| 8 | 
            -
              gem.add_dependency 'rack', '~> 1. | 
| 8 | 
            +
              gem.add_dependency 'rack', '~> 1.2'
         | 
| 9 | 
            +
              gem.add_dependency 'jwt', '~> 0.1.4'
         | 
| 9 10 | 
             
              gem.add_development_dependency 'addressable'
         | 
| 10 11 | 
             
              gem.add_development_dependency 'multi_xml'
         | 
| 11 12 | 
             
              gem.add_development_dependency 'rake'
         | 
| @@ -22,5 +23,5 @@ Gem::Specification.new do |gem| | |
| 22 23 | 
             
              gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
         | 
| 23 24 | 
             
              gem.summary = %q{A Ruby wrapper for the OAuth 2.0 protocol.}
         | 
| 24 25 | 
             
              gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
         | 
| 25 | 
            -
              gem.version = OAuth2:: | 
| 26 | 
            +
              gem.version = OAuth2::Version
         | 
| 26 27 | 
             
            end
         | 
    
        data/spec/oauth2/client_spec.rb
    CHANGED
    
    | @@ -167,6 +167,10 @@ describe OAuth2::Client do | |
| 167 167 | 
             
                subject.auth_code.should be_kind_of(OAuth2::Strategy::AuthCode)
         | 
| 168 168 | 
             
              end
         | 
| 169 169 |  | 
| 170 | 
            +
              it '#implicit should instantiate a Implicit strategy with this client' do
         | 
| 171 | 
            +
                subject.implicit.should be_kind_of(OAuth2::Strategy::Implicit)
         | 
| 172 | 
            +
              end
         | 
| 173 | 
            +
             | 
| 170 174 | 
             
              context 'with SSL options' do
         | 
| 171 175 | 
             
                subject do
         | 
| 172 176 | 
             
                  cli = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :ssl => {:ca_file => 'foo.pem'})
         | 
| @@ -0,0 +1,57 @@ | |
| 1 | 
            +
            require 'helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe OAuth2::Strategy::Assertion do
         | 
| 4 | 
            +
              let(:client) do
         | 
| 5 | 
            +
                cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com')
         | 
| 6 | 
            +
                cli.connection.build do |b|
         | 
| 7 | 
            +
                  b.adapter :test do |stub|
         | 
| 8 | 
            +
                    stub.post('/oauth/token') do |env|
         | 
| 9 | 
            +
                      case @mode
         | 
| 10 | 
            +
                        when "formencoded"
         | 
| 11 | 
            +
                          [200, {'Content-Type' => 'application/x-www-form-urlencoded'}, 'expires_in=600&access_token=salmon&refresh_token=trout']
         | 
| 12 | 
            +
                        when "json"
         | 
| 13 | 
            +
                          [200, {'Content-Type' => 'application/json'}, '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}']
         | 
| 14 | 
            +
                      end
         | 
| 15 | 
            +
                    end
         | 
| 16 | 
            +
                  end
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
                cli
         | 
| 19 | 
            +
              end
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              let(:params) { {:hmac_secret => 'foo'}}
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              subject {client.assertion}
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              describe "#authorize_url" do
         | 
| 26 | 
            +
                it "should raise NotImplementedError" do
         | 
| 27 | 
            +
                  lambda {subject.authorize_url}.should raise_error(NotImplementedError)
         | 
| 28 | 
            +
                end
         | 
| 29 | 
            +
              end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
              %w(json formencoded).each do |mode|
         | 
| 32 | 
            +
                describe "#get_token (#{mode})" do
         | 
| 33 | 
            +
                  before do
         | 
| 34 | 
            +
                    @mode = mode
         | 
| 35 | 
            +
                    @access = subject.get_token(params)
         | 
| 36 | 
            +
                  end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                  it 'returns AccessToken with same Client' do
         | 
| 39 | 
            +
                    @access.client.should == client
         | 
| 40 | 
            +
                  end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                  it 'returns AccessToken with #token' do
         | 
| 43 | 
            +
                    @access.token.should == 'salmon'
         | 
| 44 | 
            +
                  end
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                  it 'returns AccessToken with #expires_in' do
         | 
| 47 | 
            +
                    @access.expires_in.should == 600
         | 
| 48 | 
            +
                  end
         | 
| 49 | 
            +
             | 
| 50 | 
            +
                  it 'returns AccessToken with #expires_at' do
         | 
| 51 | 
            +
                    @access.expires_at.should_not be_nil
         | 
| 52 | 
            +
                  end
         | 
| 53 | 
            +
                end
         | 
| 54 | 
            +
              end
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            end
         | 
| 57 | 
            +
             | 
| @@ -0,0 +1,28 @@ | |
| 1 | 
            +
            require 'helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe OAuth2::Strategy::Implicit do
         | 
| 4 | 
            +
              let(:client) { OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              subject {client.implicit}
         | 
| 7 | 
            +
             | 
| 8 | 
            +
              describe '#authorize_url' do
         | 
| 9 | 
            +
                it 'should include the client_id' do
         | 
| 10 | 
            +
                  subject.authorize_url.should be_include('client_id=abc')
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                it 'should include the type' do
         | 
| 14 | 
            +
                  subject.authorize_url.should be_include('response_type=token')
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                it 'should include passed in options' do
         | 
| 18 | 
            +
                  cb = 'http://myserver.local/oauth/callback'
         | 
| 19 | 
            +
                  subject.authorize_url(:redirect_uri => cb).should be_include("redirect_uri=#{Rack::Utils.escape(cb)}")
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              describe "#get_token" do
         | 
| 24 | 
            +
                it "should raise NotImplementedError" do
         | 
| 25 | 
            +
                  lambda {subject.get_token}.should raise_error(NotImplementedError)
         | 
| 26 | 
            +
                end
         | 
| 27 | 
            +
              end
         | 
| 28 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,178 +1,202 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: oauth2
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version | 
| 4 | 
            -
               | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.8.0
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 | 
            -
              segments: 
         | 
| 7 | 
            -
              - 0
         | 
| 8 | 
            -
              - 7
         | 
| 9 | 
            -
              - 1
         | 
| 10 | 
            -
              version: 0.7.1
         | 
| 11 6 | 
             
            platform: ruby
         | 
| 12 | 
            -
            authors: | 
| 7 | 
            +
            authors:
         | 
| 13 8 | 
             
            - Michael Bleigh
         | 
| 14 9 | 
             
            - Erik Michaels-Ober
         | 
| 15 10 | 
             
            autorequire: 
         | 
| 16 11 | 
             
            bindir: bin
         | 
| 17 12 | 
             
            cert_chain: []
         | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 13 | 
            +
            date: 2012-07-01 00:00:00.000000000 Z
         | 
| 14 | 
            +
            dependencies:
         | 
| 15 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 22 16 | 
             
              name: faraday
         | 
| 23 | 
            -
               | 
| 24 | 
            -
              requirement: &id001 !ruby/object:Gem::Requirement 
         | 
| 17 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 25 18 | 
             
                none: false
         | 
| 26 | 
            -
                requirements: | 
| 19 | 
            +
                requirements:
         | 
| 27 20 | 
             
                - - ~>
         | 
| 28 | 
            -
                  - !ruby/object:Gem::Version | 
| 29 | 
            -
                     | 
| 30 | 
            -
                    segments: 
         | 
| 31 | 
            -
                    - 0
         | 
| 32 | 
            -
                    - 8
         | 
| 33 | 
            -
                    version: "0.8"
         | 
| 21 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 22 | 
            +
                    version: '0.8'
         | 
| 34 23 | 
             
              type: :runtime
         | 
| 35 | 
            -
              version_requirements: *id001
         | 
| 36 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 37 | 
            -
              name: httpauth
         | 
| 38 24 | 
             
              prerelease: false
         | 
| 39 | 
            -
               | 
| 25 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 26 | 
            +
                none: false
         | 
| 27 | 
            +
                requirements:
         | 
| 28 | 
            +
                - - ~>
         | 
| 29 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 30 | 
            +
                    version: '0.8'
         | 
| 31 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 32 | 
            +
              name: httpauth
         | 
| 33 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 40 34 | 
             
                none: false
         | 
| 41 | 
            -
                requirements: | 
| 35 | 
            +
                requirements:
         | 
| 42 36 | 
             
                - - ~>
         | 
| 43 | 
            -
                  - !ruby/object:Gem::Version | 
| 44 | 
            -
                     | 
| 45 | 
            -
                    segments: 
         | 
| 46 | 
            -
                    - 0
         | 
| 47 | 
            -
                    - 1
         | 
| 48 | 
            -
                    version: "0.1"
         | 
| 37 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 38 | 
            +
                    version: '0.1'
         | 
| 49 39 | 
             
              type: :runtime
         | 
| 50 | 
            -
              version_requirements: *id002
         | 
| 51 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 52 | 
            -
              name: multi_json
         | 
| 53 40 | 
             
              prerelease: false
         | 
| 54 | 
            -
               | 
| 41 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 55 42 | 
             
                none: false
         | 
| 56 | 
            -
                requirements: | 
| 43 | 
            +
                requirements:
         | 
| 57 44 | 
             
                - - ~>
         | 
| 58 | 
            -
                  - !ruby/object:Gem::Version | 
| 59 | 
            -
                     | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 45 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 46 | 
            +
                    version: '0.1'
         | 
| 47 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 48 | 
            +
              name: multi_json
         | 
| 49 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 50 | 
            +
                none: false
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ~>
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '1.0'
         | 
| 64 55 | 
             
              type: :runtime
         | 
| 65 | 
            -
               | 
| 66 | 
            -
             | 
| 56 | 
            +
              prerelease: false
         | 
| 57 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                none: false
         | 
| 59 | 
            +
                requirements:
         | 
| 60 | 
            +
                - - ~>
         | 
| 61 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 62 | 
            +
                    version: '1.0'
         | 
| 63 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 67 64 | 
             
              name: rack
         | 
| 65 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 66 | 
            +
                none: false
         | 
| 67 | 
            +
                requirements:
         | 
| 68 | 
            +
                - - ~>
         | 
| 69 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 70 | 
            +
                    version: '1.2'
         | 
| 71 | 
            +
              type: :runtime
         | 
| 68 72 | 
             
              prerelease: false
         | 
| 69 | 
            -
               | 
| 73 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 74 | 
            +
                none: false
         | 
| 75 | 
            +
                requirements:
         | 
| 76 | 
            +
                - - ~>
         | 
| 77 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 78 | 
            +
                    version: '1.2'
         | 
| 79 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 80 | 
            +
              name: jwt
         | 
| 81 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 70 82 | 
             
                none: false
         | 
| 71 | 
            -
                requirements: | 
| 83 | 
            +
                requirements:
         | 
| 72 84 | 
             
                - - ~>
         | 
| 73 | 
            -
                  - !ruby/object:Gem::Version | 
| 74 | 
            -
                     | 
| 75 | 
            -
                    segments: 
         | 
| 76 | 
            -
                    - 1
         | 
| 77 | 
            -
                    - 4
         | 
| 78 | 
            -
                    version: "1.4"
         | 
| 85 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 86 | 
            +
                    version: 0.1.4
         | 
| 79 87 | 
             
              type: :runtime
         | 
| 80 | 
            -
              version_requirements: *id004
         | 
| 81 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 82 | 
            -
              name: addressable
         | 
| 83 88 | 
             
              prerelease: false
         | 
| 84 | 
            -
               | 
| 85 | 
            -
                none: false
         | 
| 86 | 
            -
                requirements: | 
| 87 | 
            -
                - -  | 
| 88 | 
            -
                  - !ruby/object:Gem::Version | 
| 89 | 
            -
                     | 
| 90 | 
            -
             | 
| 91 | 
            -
             | 
| 92 | 
            -
             | 
| 89 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 90 | 
            +
                none: false
         | 
| 91 | 
            +
                requirements:
         | 
| 92 | 
            +
                - - ~>
         | 
| 93 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 94 | 
            +
                    version: 0.1.4
         | 
| 95 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 96 | 
            +
              name: addressable
         | 
| 97 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 98 | 
            +
                none: false
         | 
| 99 | 
            +
                requirements:
         | 
| 100 | 
            +
                - - ! '>='
         | 
| 101 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 102 | 
            +
                    version: '0'
         | 
| 93 103 | 
             
              type: :development
         | 
| 94 | 
            -
              version_requirements: *id005
         | 
| 95 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 96 | 
            -
              name: multi_xml
         | 
| 97 104 | 
             
              prerelease: false
         | 
| 98 | 
            -
               | 
| 99 | 
            -
                none: false
         | 
| 100 | 
            -
                requirements: | 
| 101 | 
            -
                - -  | 
| 102 | 
            -
                  - !ruby/object:Gem::Version | 
| 103 | 
            -
                     | 
| 104 | 
            -
             | 
| 105 | 
            -
             | 
| 106 | 
            -
             | 
| 105 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 106 | 
            +
                none: false
         | 
| 107 | 
            +
                requirements:
         | 
| 108 | 
            +
                - - ! '>='
         | 
| 109 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 110 | 
            +
                    version: '0'
         | 
| 111 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 112 | 
            +
              name: multi_xml
         | 
| 113 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 114 | 
            +
                none: false
         | 
| 115 | 
            +
                requirements:
         | 
| 116 | 
            +
                - - ! '>='
         | 
| 117 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 118 | 
            +
                    version: '0'
         | 
| 107 119 | 
             
              type: :development
         | 
| 108 | 
            -
              version_requirements: *id006
         | 
| 109 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 110 | 
            -
              name: rake
         | 
| 111 120 | 
             
              prerelease: false
         | 
| 112 | 
            -
               | 
| 113 | 
            -
                none: false
         | 
| 114 | 
            -
                requirements: | 
| 115 | 
            -
                - -  | 
| 116 | 
            -
                  - !ruby/object:Gem::Version | 
| 117 | 
            -
                     | 
| 118 | 
            -
             | 
| 119 | 
            -
             | 
| 120 | 
            -
             | 
| 121 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 122 | 
            +
                none: false
         | 
| 123 | 
            +
                requirements:
         | 
| 124 | 
            +
                - - ! '>='
         | 
| 125 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 126 | 
            +
                    version: '0'
         | 
| 127 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 128 | 
            +
              name: rake
         | 
| 129 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 130 | 
            +
                none: false
         | 
| 131 | 
            +
                requirements:
         | 
| 132 | 
            +
                - - ! '>='
         | 
| 133 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 134 | 
            +
                    version: '0'
         | 
| 121 135 | 
             
              type: :development
         | 
| 122 | 
            -
              version_requirements: *id007
         | 
| 123 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 124 | 
            -
              name: rdoc
         | 
| 125 136 | 
             
              prerelease: false
         | 
| 126 | 
            -
               | 
| 127 | 
            -
                none: false
         | 
| 128 | 
            -
                requirements: | 
| 129 | 
            -
                - -  | 
| 130 | 
            -
                  - !ruby/object:Gem::Version | 
| 131 | 
            -
                     | 
| 132 | 
            -
             | 
| 133 | 
            -
             | 
| 134 | 
            -
             | 
| 137 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 138 | 
            +
                none: false
         | 
| 139 | 
            +
                requirements:
         | 
| 140 | 
            +
                - - ! '>='
         | 
| 141 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 142 | 
            +
                    version: '0'
         | 
| 143 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 144 | 
            +
              name: rdoc
         | 
| 145 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 146 | 
            +
                none: false
         | 
| 147 | 
            +
                requirements:
         | 
| 148 | 
            +
                - - ! '>='
         | 
| 149 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 150 | 
            +
                    version: '0'
         | 
| 135 151 | 
             
              type: :development
         | 
| 136 | 
            -
              version_requirements: *id008
         | 
| 137 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 138 | 
            -
              name: rspec
         | 
| 139 152 | 
             
              prerelease: false
         | 
| 140 | 
            -
               | 
| 141 | 
            -
                none: false
         | 
| 142 | 
            -
                requirements: | 
| 143 | 
            -
                - -  | 
| 144 | 
            -
                  - !ruby/object:Gem::Version | 
| 145 | 
            -
                     | 
| 146 | 
            -
             | 
| 147 | 
            -
             | 
| 148 | 
            -
             | 
| 153 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 154 | 
            +
                none: false
         | 
| 155 | 
            +
                requirements:
         | 
| 156 | 
            +
                - - ! '>='
         | 
| 157 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 158 | 
            +
                    version: '0'
         | 
| 159 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 160 | 
            +
              name: rspec
         | 
| 161 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 162 | 
            +
                none: false
         | 
| 163 | 
            +
                requirements:
         | 
| 164 | 
            +
                - - ! '>='
         | 
| 165 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 166 | 
            +
                    version: '0'
         | 
| 149 167 | 
             
              type: :development
         | 
| 150 | 
            -
              version_requirements: *id009
         | 
| 151 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 152 | 
            -
              name: simplecov
         | 
| 153 168 | 
             
              prerelease: false
         | 
| 154 | 
            -
               | 
| 155 | 
            -
                none: false
         | 
| 156 | 
            -
                requirements: | 
| 157 | 
            -
                - -  | 
| 158 | 
            -
                  - !ruby/object:Gem::Version | 
| 159 | 
            -
                     | 
| 160 | 
            -
             | 
| 161 | 
            -
             | 
| 162 | 
            -
             | 
| 169 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 170 | 
            +
                none: false
         | 
| 171 | 
            +
                requirements:
         | 
| 172 | 
            +
                - - ! '>='
         | 
| 173 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 174 | 
            +
                    version: '0'
         | 
| 175 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 176 | 
            +
              name: simplecov
         | 
| 177 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 178 | 
            +
                none: false
         | 
| 179 | 
            +
                requirements:
         | 
| 180 | 
            +
                - - ! '>='
         | 
| 181 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 182 | 
            +
                    version: '0'
         | 
| 163 183 | 
             
              type: :development
         | 
| 164 | 
            -
               | 
| 165 | 
            -
             | 
| 166 | 
            -
             | 
| 184 | 
            +
              prerelease: false
         | 
| 185 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 186 | 
            +
                none: false
         | 
| 187 | 
            +
                requirements:
         | 
| 188 | 
            +
                - - ! '>='
         | 
| 189 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 190 | 
            +
                    version: '0'
         | 
| 191 | 
            +
            description: A Ruby wrapper for the OAuth 2.0 protocol built with a similar style
         | 
| 192 | 
            +
              to the original OAuth gem.
         | 
| 193 | 
            +
            email:
         | 
| 167 194 | 
             
            - michael@intridea.com
         | 
| 168 195 | 
             
            - sferik@gmail.com
         | 
| 169 196 | 
             
            executables: []
         | 
| 170 | 
            -
             | 
| 171 197 | 
             
            extensions: []
         | 
| 172 | 
            -
             | 
| 173 198 | 
             
            extra_rdoc_files: []
         | 
| 174 | 
            -
             | 
| 175 | 
            -
            files: 
         | 
| 199 | 
            +
            files:
         | 
| 176 200 | 
             
            - .document
         | 
| 177 201 | 
             
            - .gemtest
         | 
| 178 202 | 
             
            - .gitignore
         | 
| @@ -187,9 +211,11 @@ files: | |
| 187 211 | 
             
            - lib/oauth2/client.rb
         | 
| 188 212 | 
             
            - lib/oauth2/error.rb
         | 
| 189 213 | 
             
            - lib/oauth2/response.rb
         | 
| 214 | 
            +
            - lib/oauth2/strategy/assertion.rb
         | 
| 190 215 | 
             
            - lib/oauth2/strategy/auth_code.rb
         | 
| 191 216 | 
             
            - lib/oauth2/strategy/base.rb
         | 
| 192 217 | 
             
            - lib/oauth2/strategy/client_credentials.rb
         | 
| 218 | 
            +
            - lib/oauth2/strategy/implicit.rb
         | 
| 193 219 | 
             
            - lib/oauth2/strategy/password.rb
         | 
| 194 220 | 
             
            - lib/oauth2/version.rb
         | 
| 195 221 | 
             
            - oauth2.gemspec
         | 
| @@ -197,52 +223,45 @@ files: | |
| 197 223 | 
             
            - spec/oauth2/access_token_spec.rb
         | 
| 198 224 | 
             
            - spec/oauth2/client_spec.rb
         | 
| 199 225 | 
             
            - spec/oauth2/response_spec.rb
         | 
| 226 | 
            +
            - spec/oauth2/strategy/assertion_spec.rb
         | 
| 200 227 | 
             
            - spec/oauth2/strategy/auth_code_spec.rb
         | 
| 201 228 | 
             
            - spec/oauth2/strategy/base_spec.rb
         | 
| 202 229 | 
             
            - spec/oauth2/strategy/client_credentials_spec.rb
         | 
| 230 | 
            +
            - spec/oauth2/strategy/implicit_spec.rb
         | 
| 203 231 | 
             
            - spec/oauth2/strategy/password_spec.rb
         | 
| 204 232 | 
             
            homepage: http://github.com/intridea/oauth2
         | 
| 205 233 | 
             
            licenses: []
         | 
| 206 | 
            -
             | 
| 207 234 | 
             
            post_install_message: 
         | 
| 208 235 | 
             
            rdoc_options: []
         | 
| 209 | 
            -
             | 
| 210 | 
            -
            require_paths: 
         | 
| 236 | 
            +
            require_paths:
         | 
| 211 237 | 
             
            - lib
         | 
| 212 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement | 
| 238 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 213 239 | 
             
              none: false
         | 
| 214 | 
            -
              requirements: | 
| 215 | 
            -
              - -  | 
| 216 | 
            -
                - !ruby/object:Gem::Version | 
| 217 | 
            -
                   | 
| 218 | 
            -
             | 
| 219 | 
            -
                  - 0
         | 
| 220 | 
            -
                  version: "0"
         | 
| 221 | 
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 240 | 
            +
              requirements:
         | 
| 241 | 
            +
              - - ! '>='
         | 
| 242 | 
            +
                - !ruby/object:Gem::Version
         | 
| 243 | 
            +
                  version: '0'
         | 
| 244 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 222 245 | 
             
              none: false
         | 
| 223 | 
            -
              requirements: | 
| 224 | 
            -
              - -  | 
| 225 | 
            -
                - !ruby/object:Gem::Version | 
| 226 | 
            -
                  hash: 23
         | 
| 227 | 
            -
                  segments: 
         | 
| 228 | 
            -
                  - 1
         | 
| 229 | 
            -
                  - 3
         | 
| 230 | 
            -
                  - 6
         | 
| 246 | 
            +
              requirements:
         | 
| 247 | 
            +
              - - ! '>='
         | 
| 248 | 
            +
                - !ruby/object:Gem::Version
         | 
| 231 249 | 
             
                  version: 1.3.6
         | 
| 232 250 | 
             
            requirements: []
         | 
| 233 | 
            -
             | 
| 234 251 | 
             
            rubyforge_project: 
         | 
| 235 252 | 
             
            rubygems_version: 1.8.23
         | 
| 236 253 | 
             
            signing_key: 
         | 
| 237 254 | 
             
            specification_version: 3
         | 
| 238 255 | 
             
            summary: A Ruby wrapper for the OAuth 2.0 protocol.
         | 
| 239 | 
            -
            test_files: | 
| 256 | 
            +
            test_files:
         | 
| 240 257 | 
             
            - spec/helper.rb
         | 
| 241 258 | 
             
            - spec/oauth2/access_token_spec.rb
         | 
| 242 259 | 
             
            - spec/oauth2/client_spec.rb
         | 
| 243 260 | 
             
            - spec/oauth2/response_spec.rb
         | 
| 261 | 
            +
            - spec/oauth2/strategy/assertion_spec.rb
         | 
| 244 262 | 
             
            - spec/oauth2/strategy/auth_code_spec.rb
         | 
| 245 263 | 
             
            - spec/oauth2/strategy/base_spec.rb
         | 
| 246 264 | 
             
            - spec/oauth2/strategy/client_credentials_spec.rb
         | 
| 265 | 
            +
            - spec/oauth2/strategy/implicit_spec.rb
         | 
| 247 266 | 
             
            - spec/oauth2/strategy/password_spec.rb
         | 
| 248 267 | 
             
            has_rdoc: 
         |