Codebase list ruby-oauth2 / 7c5a139
New upstream version 1.4.1 Pirate Praveen 5 years ago
52 changed file(s) with 1895 addition(s) and 193 deletion(s). Raw diff Collapse all Expand all
77 measurement/*
88 pkg/*
99 rdoc/*
10
11 .rspec_status
0 debug.fullTrace=true
0 require: rubocop-rspec
1 inherit_from:
2 - .rubocop_todo.yml
3 - .rubocop_rspec.yml
4 AllCops:
5 DisplayCopNames: true # Display the name of the failing cops
6 TargetRubyVersion: 2.1
7 Exclude:
8 - 'gemfiles/vendor/**/*'
9 - 'vendor/**/*'
10 - '**/.irbrc'
11
12 Gemspec/RequiredRubyVersion:
13 Enabled: false
14
15 Metrics/BlockLength:
16 Enabled: false
17
018 Metrics/BlockNesting:
119 Max: 2
220
321 Metrics/LineLength:
4 AllowURI: true
522 Enabled: false
623
724 Metrics/MethodLength:
8 CountComments: false
925 Max: 15
1026
1127 Metrics/ParameterLists:
1228 Max: 4
13 CountKeywordArgs: true
1429
1530 Layout/AccessModifierIndentation:
1631 EnforcedStyle: outdent
2439 Lint/UnusedBlockArgument:
2540 Exclude:
2641 - 'spec/**/*.rb'
42 - 'gemfiles/vendor/**/*'
43 - 'vendor/**/*'
44 - '**/.irbrc'
45
46 RSpec/DescribeClass:
47 Exclude:
48 - 'spec/examples/*'
49
50 RSpec/NestedGroups:
51 Enabled: false
2752
2853 Style/ClassVars:
2954 Enabled: false
4166 Style/DoubleNegation:
4267 Enabled: false
4368
44 Style/EachWithObject:
45 Enabled: false
46
4769 Style/EmptyMethod:
4870 EnforcedStyle: expanded
4971
5072 Style/Encoding:
5173 Enabled: false
5274
53 Style/HashSyntax:
54 EnforcedStyle: hash_rockets
75 Style/TrailingCommaInArrayLiteral:
76 EnforcedStyleForMultiline: comma
5577
56 Style/Lambda:
57 Enabled: false
58
59 Style/SymbolArray:
60 Enabled: false
61
62 Style/TrailingCommaInLiteral:
63 EnforcedStyleForMultiline: 'comma'
64
65 Metrics/BlockLength:
66 Enabled: false
78 Style/TrailingCommaInHashLiteral:
79 EnforcedStyleForMultiline: comma
0 RSpec/FilePath:
1 Enabled: false
2
3 RSpec/MultipleExpectations:
4 Enabled: false
5
6 RSpec/NamedSubject:
7 Enabled: false
8
9 RSpec/ExampleLength:
10 Enabled: false
11
12 RSpec/VerifiedDoubles:
13 Enabled: false
14
15 RSpec/MessageSpies:
16 Enabled: false
17
18 RSpec/InstanceVariable:
19 Enabled: false
20
21 RSpec/NestedGroups:
22 Enabled: false
23
24 RSpec/ExpectInHook:
25 Enabled: false
0 Style/HashSyntax:
1 EnforcedStyle: hash_rockets
2
3 Style/Lambda:
4 Enabled: false
5
6 Style/SymbolArray:
7 Enabled: false
8
9 Style/EachWithObject:
10 Enabled: false
11
12 # Once we drop Rubies that lack support for __dir__ we can turn this on.
13 Style/ExpandPathArguments:
14 Enabled: false
00 before_install:
1 - gem update bundler
1 - gem update --system
2 - gem install bundler
23
3 bundler_args: --without development
4 bundler_args: --no-deployment --jobs 3 --retry 3
45
56 cache: bundler
67
7 env:
8 global:
9 - JRUBY_OPTS="$JRUBY_OPTS --debug"
10
118 language: ruby
12
13 rvm:
14 - 1.9.3
15 - 2.0.0
16 - 2.1.10
17 - 2.2.7
18 - 2.3.4
19 - 2.4.1
20 - jruby-9.1.10.0
21 - jruby-head
22 - ruby-head
239
2410 matrix:
2511 allow_failures:
2612 - rvm: jruby-head
2713 - rvm: ruby-head
14 - rvm: rbx-3
2815 fast_finish: true
16 include:
17 - rvm: jruby-1.7.27 # targets MRI v1.9
18 gemfile: gemfiles/jruby_1.7.gemfile
19 - rvm: 1.9.3-p551
20 gemfile: gemfiles/ruby_1.9.gemfile
21 - rvm: 2.0.0-p648
22 gemfile: gemfiles/ruby_2.0.gemfile
23 - rvm: 2.1.10
24 gemfile: gemfiles/ruby_2.1.gemfile
25 - rvm: jruby-9.0.5.0 # targets MRI v2.0
26 gemfile: gemfiles/jruby_9.0.gemfile
27 # DEPRECATION WARNING
28 # oauth2 1.x series releases are the last to support Ruby versions above
29 # oauth2 2.x series releases will support Ruby versions below, and not above
30 - rvm: jruby-9.1.9.0 # targets MRI v2.3
31 gemfile: gemfiles/jruby_9.1.gemfile
32 - rvm: 2.2.10
33 gemfile: gemfiles/ruby_2.2.gemfile
34 - rvm: 2.3.7
35 gemfile: gemfiles/ruby_2.3.gemfile
36 - rvm: 2.4.4
37 gemfile: gemfiles/ruby_2.4.gemfile
38 - rvm: jruby-9.2.0.0 # targets MRI v2.5
39 gemfile: gemfiles/jruby_9.2.gemfile
40 - rvm: 2.5.1
41 gemfile: gemfiles/ruby_2.5.gemfile
42 - rvm: jruby-head
43 gemfile: gemfiles/jruby_head.gemfile
44 - rvm: ruby-head
45 gemfile: gemfiles/ruby_head.gemfile
46 - rvm: rbx-3
2947
3048 sudo: false
11 All notable changes to this project will be documented in this file.
22
33 ## [unreleased]
4 - No significant changes.
4
5 - no changes yet
6
7 ## [1.4.1] - 2018-10-13
8
9 - [#417](oauth-xx/oauth2#417) - update jwt dependency (@thewoolleyman)
10 - [#418](oauth-xx/oauth2#418) - remove rubocop dependency (temporary, added back in [#423](oauth-xx/oauth2#423)) (@pboling)
11 - [#419](oauth-xx/oauth2#419) - update faraday dependency (@pboling)
12 - [#420](oauth-xx/oauth2#420) - update [oauth2.gemspec](oauth2.gemspec) (@pboling)
13 - [#421](oauth-xx/oauth2#421) - fix [CHANGELOG.md](CHANGELOG.md) for previous releases (@pboling)
14 - [#422](oauth-xx/oauth2#422) - update [LICENSE](LICENSE) and [README.md](README.md) (@pboling)
15 - [#423](oauth-xx/oauth2#423) - update [builds](https://travis-ci.org/oauth-xx/oauth2/builds), [Rakefile](Rakefile) (@pboling)
16 - officially document supported Rubies
17 * Ruby 1.9.3
18 * Ruby 2.0.0
19 * Ruby 2.1
20 * Ruby 2.2
21 * [JRuby 1.7][jruby-1.7] (targets MRI v1.9)
22 * [JRuby 9.0][jruby-9.0] (targets MRI v2.0)
23 * Ruby 2.3
24 * Ruby 2.4
25 * Ruby 2.5
26 * [JRuby 9.1][jruby-9.1] (targets MRI v2.3)
27 * [JRuby 9.2][jruby-9.2] (targets MRI v2.5)
28
29 [jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html
30 [jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html
31 [jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html
32 [jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html
33
34 ## [1.4.0] - 2017-06-09
35
36 - Drop Ruby 1.8.7 support (@sferik)
37 - Fix some RuboCop offenses (@sferik)
38 - _Dependency_: Remove Yardstick (@sferik)
39 - _Dependency_: Upgrade Faraday to 0.12 (@sferik)
40
41 ## [1.3.1] - 2017-03-03
42
43 - Add support for Ruby 2.4.0 (@pschambacher)
44 - _Dependency_: Upgrade Faraday to Faraday 0.11 (@mcfiredrill, @rhymes, @pschambacher)
545
646 ## [1.3.0] - 2016-12-28
747
848 - Add support for header-based authentication to the `Client` so it can be used across the library (@bjeanes)
949 - Default to header-based authentication when getting a token from an authorisation code (@maletor)
10 - Allow an `auth_scheme` (`:basic_auth` or `:request_body`) to be set on the client, defaulting to `:request_body` to maintain backwards compatibility (@maletor, @bjeanes)
50 - **Breaking**: Allow an `auth_scheme` (`:basic_auth` or `:request_body`) to be set on the client, defaulting to `:request_body` to maintain backwards compatibility (@maletor, @bjeanes)
1151 - Handle `redirect_uri` according to the OAuth 2 spec, so it is passed on redirect and at the point of token exchange (@bjeanes)
1252 - Refactor handling of encoding of error responses (@urkle)
1353 - Avoid instantiating an `Error` if there is no error to raise (@urkle)
4181 - [breaking] `access_token_method` Client option renamed to `token_method`.
4282 - [breaking] `web_server` renamed to `auth_code`.
4383
44 [0.5.0]: https://github.com/intridea/oauth2/compare/v0.4.1...v0.5.0
45 [1.0.0]: https://github.com/intridea/oauth2/compare/v0.9.4...v1.0.0
46 [1.1.0]: https://github.com/intridea/oauth2/compare/v1.0.0...v1.1.0
47 [1.2.0]: https://github.com/intridea/oauth2/compare/v1.1.0...v1.2.0
48 [1.3.0]: https://github.com/intridea/oauth2/compare/v1.2.0...v1.3.0
49 [unreleased]: https://github.com/intridea/oauth2/compare/v1.3.0...HEAD
84 ## [0.4.1] - 2011-04-20
5085
86 ## [0.4.0] - 2011-04-20
87
88 ## [0.3.0] - 2011-04-08
89
90 ## [0.2.0] - 2011-04-01
91
92 ## [0.1.1] - 2011-01-12
93
94 ## [0.1.0] - 2010-10-13
95
96 ## [0.0.13] + [0.0.12] + [0.0.11] - 2010-08-17
97
98 ## [0.0.10] - 2010-06-19
99
100 ## [0.0.9] - 2010-06-18
101
102 ## [0.0.8] + [0.0.7] - 2010-04-27
103
104 ## [0.0.6] - 2010-04-25
105
106 ## [0.0.5] - 2010-04-23
107
108 ## [0.0.4] + [0.0.3] + [0.0.2] + [0.0.1] - 2010-04-22
109
110
111 [0.0.1]: https://github.com/oauth-xx/oauth2/compare/311d9f4...v0.0.1
112 [0.0.2]: https://github.com/oauth-xx/oauth2/compare/v0.0.1...v0.0.2
113 [0.0.3]: https://github.com/oauth-xx/oauth2/compare/v0.0.2...v0.0.3
114 [0.0.4]: https://github.com/oauth-xx/oauth2/compare/v0.0.3...v0.0.4
115 [0.0.5]: https://github.com/oauth-xx/oauth2/compare/v0.0.4...v0.0.5
116 [0.0.6]: https://github.com/oauth-xx/oauth2/compare/v0.0.5...v0.0.6
117 [0.0.7]: https://github.com/oauth-xx/oauth2/compare/v0.0.6...v0.0.7
118 [0.0.8]: https://github.com/oauth-xx/oauth2/compare/v0.0.7...v0.0.8
119 [0.0.9]: https://github.com/oauth-xx/oauth2/compare/v0.0.8...v0.0.9
120 [0.0.10]: https://github.com/oauth-xx/oauth2/compare/v0.0.9...v0.0.10
121 [0.0.11]: https://github.com/oauth-xx/oauth2/compare/v0.0.10...v0.0.11
122 [0.0.12]: https://github.com/oauth-xx/oauth2/compare/v0.0.11...v0.0.12
123 [0.0.13]: https://github.com/oauth-xx/oauth2/compare/v0.0.12...v0.0.13
124 [0.1.0]: https://github.com/oauth-xx/oauth2/compare/v0.0.13...v0.1.0
125 [0.1.1]: https://github.com/oauth-xx/oauth2/compare/v0.1.0...v0.1.1
126 [0.2.0]: https://github.com/oauth-xx/oauth2/compare/v0.1.1...v0.2.0
127 [0.3.0]: https://github.com/oauth-xx/oauth2/compare/v0.2.0...v0.3.0
128 [0.4.0]: https://github.com/oauth-xx/oauth2/compare/v0.3.0...v0.4.0
129 [0.4.1]: https://github.com/oauth-xx/oauth2/compare/v0.4.0...v0.4.1
130 [0.5.0]: https://github.com/oauth-xx/oauth2/compare/v0.4.1...v0.5.0
131 [1.0.0]: https://github.com/oauth-xx/oauth2/compare/v0.9.4...v1.0.0
132 [1.1.0]: https://github.com/oauth-xx/oauth2/compare/v1.0.0...v1.1.0
133 [1.2.0]: https://github.com/oauth-xx/oauth2/compare/v1.1.0...v1.2.0
134 [1.3.0]: https://github.com/oauth-xx/oauth2/compare/v1.2.0...v1.3.0
135 [1.3.1]: https://github.com/oauth-xx/oauth2/compare/v1.3.0...v1.3.1
136 [1.4.0]: https://github.com/oauth-xx/oauth2/compare/v1.3.1...v1.4.0
137 [1.4.1]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...v1.4.1
138 [unreleased]: https://github.com/oauth-xx/oauth2/compare/v1.4.0...1-4-stable
0 # Contributor Covenant Code of Conduct
1
2 ## Our Pledge
3
4 In the interest of fostering an open and welcoming environment, we as
5 contributors and maintainers pledge to making participation in our project and
6 our community a harassment-free experience for everyone, regardless of age, body
7 size, disability, ethnicity, gender identity and expression, level of experience,
8 nationality, personal appearance, race, religion, or sexual identity and
9 orientation.
10
11 ## Our Standards
12
13 Examples of behavior that contributes to creating a positive environment
14 include:
15
16 * Using welcoming and inclusive language
17 * Being respectful of differing viewpoints and experiences
18 * Gracefully accepting constructive criticism
19 * Focusing on what is best for the community
20 * Showing empathy towards other community members
21
22 Examples of unacceptable behavior by participants include:
23
24 * The use of sexualized language or imagery and unwelcome sexual attention or
25 advances
26 * Trolling, insulting/derogatory comments, and personal or political attacks
27 * Public or private harassment
28 * Publishing others' private information, such as a physical or electronic
29 address, without explicit permission
30 * Other conduct which could reasonably be considered inappropriate in a
31 professional setting
32
33 ## Our Responsibilities
34
35 Project maintainers are responsible for clarifying the standards of acceptable
36 behavior and are expected to take appropriate and fair corrective action in
37 response to any instances of unacceptable behavior.
38
39 Project maintainers have the right and responsibility to remove, edit, or
40 reject comments, commits, code, wiki edits, issues, and other contributions
41 that are not aligned to this Code of Conduct, or to ban temporarily or
42 permanently any contributor for other behaviors that they deem inappropriate,
43 threatening, offensive, or harmful.
44
45 ## Scope
46
47 This Code of Conduct applies both within project spaces and in public spaces
48 when an individual is representing the project or its community. Examples of
49 representing a project or community include using an official project e-mail
50 address, posting via an official social media account, or acting as an appointed
51 representative at an online or offline event. Representation of a project may be
52 further defined and clarified by project maintainers.
53
54 ## Enforcement
55
56 Instances of abusive, harassing, or otherwise unacceptable behavior may be
57 reported by contacting the project team at peter.boling@gmail.com. All
58 complaints will be reviewed and investigated and will result in a response that
59 is deemed necessary and appropriate to the circumstances. The project team is
60 obligated to maintain confidentiality with regard to the reporter of an incident.
61 Further details of specific enforcement policies may be posted separately.
62
63 Project maintainers who do not follow or enforce the Code of Conduct in good
64 faith may face temporary or permanent repercussions as determined by other
65 members of the project's leadership.
66
67 ## Attribution
68
69 This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
70 available at [http://contributor-covenant.org/version/1/4][version]
71
72 [homepage]: http://contributor-covenant.org
73 [version]: http://contributor-covenant.org/version/1/4/
00 source 'https://rubygems.org'
1
2 git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
13
24 gem 'faraday', '~> 0.9.2', :platforms => [:jruby_18, :ruby_18]
35 gem 'jwt', '< 1.5.2', :platforms => [:jruby_18, :ruby_18]
46 gem 'rake', '< 11.0'
57 gem 'rdoc', '~> 4.2.2'
68
7 group :development do
8 gem 'pry'
9 end
9 group :test do
10 ruby_version = Gem::Version.new(RUBY_VERSION)
11 if ruby_version >= Gem::Version.new('2.1')
12 # TODO: Upgrade to >= 0.59 when we drop Rubies below 2.2
13 # Error: Unsupported Ruby version 2.1 found in `TargetRubyVersion` parameter (in .rubocop.yml). 2.1-compatible analysis was dropped after version 0.58.
14 # Supported versions: 2.2, 2.3, 2.4, 2.5
15 gem 'rubocop', '~> 0.57.0'
16 gem 'rubocop-rspec', '~> 1.27.0' # last version that can use rubocop < 0.58
17 end
18 gem 'pry', '~> 0.11' if ruby_version >= Gem::Version.new('2.0')
19 gem 'rspec-pending_for'
1020
11 group :test do
1221 gem 'addressable', '~> 2.3.8'
1322 gem 'backports'
1423 gem 'coveralls'
1524 gem 'rack', '~> 1.2', :platforms => [:jruby_18, :jruby_19, :ruby_18, :ruby_19, :ruby_20, :ruby_21]
1625 gem 'rspec', '>= 3'
17 gem 'rubocop', '>= 0.37', :platforms => [:ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
1826 gem 'simplecov', '>= 0.9'
1927
2028 platforms :jruby_18, :ruby_18 do
0 MIT License
1
2 Copyright (c) 2011 - 2013 Michael Bleigh and Intridea, Inc.
3 Copyright (c) 2017 - 2018 oauth-xx organization, https://github.com/oauth-xx
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in all
13 copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 SOFTWARE.
+0
-20
LICENSE.md less more
0 Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc.
1
2 Permission is hereby granted, free of charge, to any person obtaining
3 a copy of this software and associated documentation files (the
4 "Software"), to deal in the Software without restriction, including
5 without limitation the rights to use, copy, modify, merge, publish,
6 distribute, sublicense, and/or sell copies of the Software, and to
7 permit persons to whom the Software is furnished to do so, subject to
8 the following conditions:
9
10 The above copyright notice and this permission notice shall be
11 included in all copies or substantial portions of the Software.
12
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
17 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
19 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00 # OAuth2
11
22 [![Gem Version](http://img.shields.io/gem/v/oauth2.svg)][gem]
3 [![Build Status](http://img.shields.io/travis/intridea/oauth2.svg)][travis]
4 [![Dependency Status](http://img.shields.io/gemnasium/intridea/oauth2.svg)][gemnasium]
5 [![Code Climate](http://img.shields.io/codeclimate/github/intridea/oauth2.svg)][codeclimate]
3 [![Total Downloads](https://img.shields.io/gem/dt/oauth2.svg)][gem]
4 [![Downloads Today](https://img.shields.io/gem/rt/oauth2.svg)][gem]
5 [![Build Status](http://img.shields.io/travis/oauth-xx/oauth2.svg)][travis]
66 [![Coverage Status](http://img.shields.io/coveralls/intridea/oauth2.svg)][coveralls]
7 [![Maintainability](https://api.codeclimate.com/v1/badges/688c612528ff90a46955/maintainability)][codeclimate-maintainability]
8 [![Depfu](https://badges.depfu.com/badges/6d34dc1ba682bbdf9ae2a97848241743/count.svg)][depfu]
9 [![Open Source Helpers](https://www.codetriage.com/oauth-xx/oauth2/badges/users.svg)][code-triage]
10 [![Chat](https://img.shields.io/gitter/room/oauth-xx/oauth2.svg)](https://gitter.im/oauth-xx/oauth2)
11 [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][source-license]
12 [![Documentation](http://inch-ci.org/github/oauth-xx/oauth2.png)][inch-ci]
713
814 [gem]: https://rubygems.org/gems/oauth2
9 [travis]: http://travis-ci.org/intridea/oauth2
10 [gemnasium]: https://gemnasium.com/intridea/oauth2
11 [codeclimate]: https://codeclimate.com/github/intridea/oauth2
12 [coveralls]: https://coveralls.io/r/intridea/oauth2
13
14 A Ruby wrapper for the OAuth 2.0 specification.
15 [travis]: http://travis-ci.org/oauth-xx/oauth2
16 [coveralls]: https://coveralls.io/r/oauth-xx/oauth2
17 [codeclimate-maintainability]: https://codeclimate.com/github/oauth-xx/oauth2/maintainability
18 [depfu]: https://depfu.com/github/oauth-xx/oauth2
19 [source-license]: https://opensource.org/licenses/MIT
20 [inch-ci]: http://inch-ci.org/github/oauth-xx/oauth2
21 [code-triage]: https://www.codetriage.com/oauth-xx/oauth2
22
23 A Ruby wrapper for the [OAuth 2.0 specification][oauth2-spec].
24
25 [oauth2-spec]: https://oauth.net/2/
1526
1627 ## Installation
17 gem install oauth2
28
29 Add this line to your application's Gemfile:
30
31 ```ruby
32 gem 'oauth2'
33 ```
34
35 And then execute:
36
37 $ bundle
38
39 Or install it yourself as:
40
41 $ gem install oauth2
1842
1943 ## Resources
44
2045 * [View Source on GitHub][code]
2146 * [Report Issues on GitHub][issues]
2247 * [Read More at the Wiki][wiki]
2348
24 [code]: https://github.com/intridea/oauth2
25 [issues]: https://github.com/intridea/oauth2/issues
26 [wiki]: https://wiki.github.com/intridea/oauth2
49 [code]: https://github.com/oauth-xx/oauth2
50 [issues]: https://github.com/oauth-xx/oauth2/issues
51 [wiki]: https://github.com/oauth-xx/oauth2/wiki
2752
2853 ## Usage Examples
2954
99124 requests for tokens for any Authentication grant type.
100125
101126 ## Supported Ruby Versions
127
102128 This library aims to support and is [tested against][travis] the following Ruby
103129 implementations:
130
131 ### Rubies with support ending at Oauth2 2.x
104132
105133 * Ruby 1.9.3
106134 * Ruby 2.0.0
107135 * Ruby 2.1
108136 * Ruby 2.2
109 * Ruby 2.3
137 * [JRuby 1.7][jruby-1.7] (targets MRI v1.9)
138 * [JRuby 9.0][jruby-9.0] (targets MRI v2.0)
139
140 ---
141
142 ### Rubies with continued support past Oauth2 2.x
143
144 * Ruby 2.3 - Support through version 3.x series
110145 * Ruby 2.4
111 * [JRuby 9K][jruby]
112
113 [jruby]: http://jruby.org/
146 * Ruby 2.5
147 * [JRuby 9.1][jruby-9.1] (targets MRI v2.3)
148 * [JRuby 9.2][jruby-9.2] (targets MRI v2.5)
149
150 [jruby-1.7]: https://www.jruby.org/2017/05/11/jruby-1-7-27.html
151 [jruby-9.0]: https://www.jruby.org/2016/01/26/jruby-9-0-5-0.html
152 [jruby-9.1]: https://www.jruby.org/2017/05/16/jruby-9-1-9-0.html
153 [jruby-9.2]: https://www.jruby.org/2018/05/24/jruby-9-2-0-0.html
114154
115155 If something doesn't work on one of these interpreters, it's a bug.
116156
125165 fashion. If critical issues for a particular implementation exist at the time
126166 of a major release, support for that Ruby version may be dropped.
127167
168 ## Versioning
169
170 This library aims to adhere to [Semantic Versioning 2.0.0][semver].
171 Violations of this scheme should be reported as bugs. Specifically,
172 if a minor or patch version is released that breaks backward
173 compatibility, a new version should be immediately released that
174 restores compatibility. Breaking changes to the public API will
175 only be introduced with new major versions.
176
177 As a result of this policy, you can (and should) specify a
178 dependency on this gem using the [Pessimistic Version Constraint][pvc] with two digits of precision.
179
180 For example:
181
182 ```ruby
183 spec.add_dependency 'oauth2', '~> 1.4'
184 ```
185
186 [semver]: http://semver.org/
187 [pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
188
128189 ## License
129 Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc. See [LICENSE][] for
130 details.
131
132 [license]: LICENSE.md
190
191 [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)][source-license]
192
193 - Copyright (c) 2011-2013 Michael Bleigh and Intridea, Inc.
194 - Copyright (c) 2017-2018 [oauth-xx organization][oauth-xx]
195 - See [LICENSE][license] for details.
196
197 [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2.svg?type=large)][fossa2]
198
199 [license]: LICENSE
200 [oauth-xx]: https://github.com/oauth-xx
201 [fossa2]: https://app.fossa.io/projects/git%2Bgithub.com%2Foauth-xx%2Foauth2?ref=badge_large
202
203 ## Development
204
205 After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
206
207 To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
208
209 ## Contributing
210
211 Bug reports and pull requests are welcome on GitHub at https://github.com/oauth-xx/oauth2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
212
213 ## Code of Conduct
214
215 Everyone interacting in the OAuth2 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/oauth-xx/oauth2/blob/master/CODE_OF_CONDUCT.md).
0 require 'bundler'
1 Bundler::GemHelper.install_tasks
0 # encoding: utf-8
21
3 require 'rspec/core/rake_task'
4 RSpec::Core::RakeTask.new(:spec)
2 # !/usr/bin/env rake
53
4 require 'bundler/gem_tasks'
5
6 begin
7 require 'wwtd/tasks'
8 rescue LoadError
9 puts 'failed to load wwtd'
10 end
11
12 begin
13 require 'rspec/core/rake_task'
14 RSpec::Core::RakeTask.new(:spec)
15 rescue LoadError
16 task :spec do
17 warn 'rspec is disabled'
18 end
19 end
620 task :test => :spec
21
22 begin
23 require 'rubocop/rake_task'
24 RuboCop::RakeTask.new do |task|
25 task.options = ['-D'] # Display the name of the failing cops
26 end
27 rescue LoadError
28 task :rubocop do
29 warn 'RuboCop is disabled'
30 end
31 end
732
833 namespace :doc do
934 require 'rdoc/task'
1641 end
1742 end
1843
19 begin
20 require 'rubocop/rake_task'
21 RuboCop::RakeTask.new do |task|
22 task.options = ['-D'] # Display the name of the failing cops
23 end
24 rescue LoadError
25 task :rubocop do
26 $stderr.puts 'RuboCop is disabled'
27 end
28 end
29
30 task :default => [:spec, :rubocop]
44 task :default => [:test, :rubocop]
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :test do
5 gem 'rake'
6 gem 'rspec'
7 gem 'rspec-pending_for'
8 end
9
10 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.4.0)
14 backports (3.11.4)
15 coveralls (0.8.22)
16 json (>= 1.8, < 3)
17 simplecov (~> 0.16.1)
18 term-ansicolor (~> 1.3)
19 thor (~> 0.19.4)
20 tins (~> 1.6)
21 diff-lcs (1.3)
22 docile (1.3.1)
23 faraday (0.9.2)
24 multipart-post (>= 1.2, < 3)
25 json (2.1.0-java)
26 jwt (1.5.6)
27 multi_json (1.13.1)
28 multi_xml (0.6.0)
29 multipart-post (2.0.0)
30 rack (1.6.10)
31 rake (12.2.1)
32 rdoc (5.1.0)
33 rspec (3.8.0)
34 rspec-core (~> 3.8.0)
35 rspec-expectations (~> 3.8.0)
36 rspec-mocks (~> 3.8.0)
37 rspec-core (3.8.0)
38 rspec-support (~> 3.8.0)
39 rspec-expectations (3.8.2)
40 diff-lcs (>= 1.2.0, < 2.0)
41 rspec-support (~> 3.8.0)
42 rspec-mocks (3.8.0)
43 diff-lcs (>= 1.2.0, < 2.0)
44 rspec-support (~> 3.8.0)
45 rspec-pending_for (0.1.13)
46 rspec-core
47 ruby_engine (~> 1.0)
48 ruby_version (~> 1.0)
49 rspec-support (3.8.0)
50 ruby_engine (1.0.1)
51 ruby_version (1.0.1)
52 simplecov (0.16.1)
53 docile (~> 1.1)
54 json (>= 1.8, < 3)
55 simplecov-html (~> 0.10.0)
56 simplecov-html (0.10.2)
57 term-ansicolor (1.3.2)
58 tins (~> 1.0)
59 thor (0.19.4)
60 tins (1.6.0)
61 wwtd (1.3.0)
62
63 PLATFORMS
64 java
65
66 DEPENDENCIES
67 addressable (~> 2.3)
68 backports (~> 3.11)
69 bundler (~> 1.16)
70 coveralls (~> 0.8)
71 faraday (= 0.9.2)
72 oauth2!
73 rake
74 rdoc (>= 5.0, < 7)
75 rspec
76 rspec-pending_for
77 wwtd
78
79 BUNDLED WITH
80 1.16.6
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :test do
5 gem 'rake'
6 gem 'rspec'
7 gem 'rspec-pending_for'
8 gem 'rubocop', '~> 0.53.0'
9 gem 'rubocop-rspec', '~> 1.24.0'
10 end
11
12 gemspec :path => '../'
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 ffi (1.9.25-java)
29 json (2.1.0-java)
30 jwt (2.1.0)
31 method_source (0.9.0)
32 multi_json (1.13.1)
33 multi_xml (0.6.0)
34 multipart-post (2.0.0)
35 parallel (1.12.1)
36 parser (2.5.1.2)
37 ast (~> 2.4.0)
38 powerpack (0.1.2)
39 pry (0.11.3-java)
40 coderay (~> 1.1.0)
41 method_source (~> 0.9.0)
42 spoon (~> 0.0)
43 public_suffix (3.0.3)
44 rack (2.0.5)
45 rainbow (3.0.0)
46 rake (12.3.1)
47 rdoc (6.0.4)
48 rspec (3.8.0)
49 rspec-core (~> 3.8.0)
50 rspec-expectations (~> 3.8.0)
51 rspec-mocks (~> 3.8.0)
52 rspec-core (3.8.0)
53 rspec-support (~> 3.8.0)
54 rspec-expectations (3.8.2)
55 diff-lcs (>= 1.2.0, < 2.0)
56 rspec-support (~> 3.8.0)
57 rspec-mocks (3.8.0)
58 diff-lcs (>= 1.2.0, < 2.0)
59 rspec-support (~> 3.8.0)
60 rspec-pending_for (0.1.13)
61 rspec-core
62 ruby_engine (~> 1.0)
63 ruby_version (~> 1.0)
64 rspec-support (3.8.0)
65 rubocop (0.53.0)
66 parallel (~> 1.10)
67 parser (>= 2.5)
68 powerpack (~> 0.1)
69 rainbow (>= 2.2.2, < 4.0)
70 ruby-progressbar (~> 1.7)
71 unicode-display_width (~> 1.0, >= 1.0.1)
72 rubocop-rspec (1.24.0)
73 rubocop (>= 0.53.0)
74 ruby-progressbar (1.10.0)
75 ruby_engine (1.0.1)
76 ruby_version (1.0.1)
77 simplecov (0.16.1)
78 docile (~> 1.1)
79 json (>= 1.8, < 3)
80 simplecov-html (~> 0.10.0)
81 simplecov-html (0.10.2)
82 spoon (0.0.6)
83 ffi
84 term-ansicolor (1.6.0)
85 tins (~> 1.0)
86 thor (0.19.4)
87 tins (1.16.3)
88 unicode-display_width (1.4.0)
89 wwtd (1.3.0)
90
91 PLATFORMS
92 java
93
94 DEPENDENCIES
95 addressable (~> 2.3)
96 backports (~> 3.11)
97 bundler (~> 1.16)
98 coveralls (~> 0.8)
99 faraday (= 0.9.2)
100 oauth2!
101 pry
102 rake
103 rdoc (>= 5.0, < 7)
104 rspec
105 rspec-pending_for
106 rubocop (~> 0.53.0)
107 rubocop-rspec (~> 1.24.0)
108 wwtd
109
110 BUNDLED WITH
111 1.16.4
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 ffi (1.9.25-java)
29 json (2.1.0-java)
30 jwt (2.1.0)
31 method_source (0.9.0)
32 multi_json (1.13.1)
33 multi_xml (0.6.0)
34 multipart-post (2.0.0)
35 parallel (1.12.1)
36 parser (2.5.1.2)
37 ast (~> 2.4.0)
38 powerpack (0.1.2)
39 pry (0.11.3-java)
40 coderay (~> 1.1.0)
41 method_source (~> 0.9.0)
42 spoon (~> 0.0)
43 public_suffix (3.0.3)
44 rack (2.0.5)
45 rainbow (3.0.0)
46 rake (12.3.1)
47 rdoc (6.0.4)
48 rspec (3.8.0)
49 rspec-core (~> 3.8.0)
50 rspec-expectations (~> 3.8.0)
51 rspec-mocks (~> 3.8.0)
52 rspec-core (3.8.0)
53 rspec-support (~> 3.8.0)
54 rspec-expectations (3.8.2)
55 diff-lcs (>= 1.2.0, < 2.0)
56 rspec-support (~> 3.8.0)
57 rspec-mocks (3.8.0)
58 diff-lcs (>= 1.2.0, < 2.0)
59 rspec-support (~> 3.8.0)
60 rspec-pending_for (0.1.13)
61 rspec-core
62 ruby_engine (~> 1.0)
63 ruby_version (~> 1.0)
64 rspec-support (3.8.0)
65 rubocop (0.53.0)
66 parallel (~> 1.10)
67 parser (>= 2.5)
68 powerpack (~> 0.1)
69 rainbow (>= 2.2.2, < 4.0)
70 ruby-progressbar (~> 1.7)
71 unicode-display_width (~> 1.0, >= 1.0.1)
72 rubocop-rspec (1.24.0)
73 rubocop (>= 0.53.0)
74 ruby-progressbar (1.10.0)
75 ruby_engine (1.0.1)
76 ruby_version (1.0.1)
77 simplecov (0.16.1)
78 docile (~> 1.1)
79 json (>= 1.8, < 3)
80 simplecov-html (~> 0.10.0)
81 simplecov-html (0.10.2)
82 spoon (0.0.6)
83 ffi
84 term-ansicolor (1.6.0)
85 tins (~> 1.0)
86 thor (0.19.4)
87 tins (1.16.3)
88 unicode-display_width (1.4.0)
89 wwtd (1.3.0)
90
91 PLATFORMS
92 java
93
94 DEPENDENCIES
95 addressable (~> 2.3)
96 backports (~> 3.11)
97 bundler (~> 1.16)
98 coveralls (~> 0.8)
99 faraday (= 0.9.2)
100 oauth2!
101 pry
102 rake
103 rdoc (>= 5.0, < 7)
104 rspec
105 rspec-pending_for
106 rubocop (~> 0.53.0)
107 rubocop-rspec (~> 1.24.0)
108 wwtd
109
110 BUNDLED WITH
111 1.16.4
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 gem 'json', '< 2.0'
5 gem 'rack', '~> 1.2'
6 gem 'term-ansicolor', '< 1.4.0'
7 gem 'tins', '< 1.7'
8
9 group :test do
10 gem 'rake'
11 gem 'rspec'
12 gem 'rspec-pending_for'
13 end
14
15 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.4.0)
14 backports (3.11.4)
15 coveralls (0.8.22)
16 json (>= 1.8, < 3)
17 simplecov (~> 0.16.1)
18 term-ansicolor (~> 1.3)
19 thor (~> 0.19.4)
20 tins (~> 1.6)
21 diff-lcs (1.3)
22 docile (1.3.1)
23 faraday (0.9.2)
24 multipart-post (>= 1.2, < 3)
25 json (1.8.6)
26 jwt (1.5.6)
27 multi_json (1.13.1)
28 multi_xml (0.6.0)
29 multipart-post (2.0.0)
30 rack (1.6.10)
31 rake (12.2.1)
32 rdoc (5.1.0)
33 rspec (3.8.0)
34 rspec-core (~> 3.8.0)
35 rspec-expectations (~> 3.8.0)
36 rspec-mocks (~> 3.8.0)
37 rspec-core (3.8.0)
38 rspec-support (~> 3.8.0)
39 rspec-expectations (3.8.2)
40 diff-lcs (>= 1.2.0, < 2.0)
41 rspec-support (~> 3.8.0)
42 rspec-mocks (3.8.0)
43 diff-lcs (>= 1.2.0, < 2.0)
44 rspec-support (~> 3.8.0)
45 rspec-pending_for (0.1.13)
46 rspec-core
47 ruby_engine (~> 1.0)
48 ruby_version (~> 1.0)
49 rspec-support (3.8.0)
50 ruby_engine (1.0.1)
51 ruby_version (1.0.1)
52 simplecov (0.16.1)
53 docile (~> 1.1)
54 json (>= 1.8, < 3)
55 simplecov-html (~> 0.10.0)
56 simplecov-html (0.10.2)
57 term-ansicolor (1.3.2)
58 tins (~> 1.0)
59 thor (0.19.4)
60 tins (1.6.0)
61 wwtd (1.3.0)
62
63 PLATFORMS
64 ruby
65
66 DEPENDENCIES
67 addressable (~> 2.3)
68 backports (~> 3.11)
69 bundler (~> 1.16)
70 coveralls (~> 0.8)
71 faraday (= 0.9.2)
72 json (< 2.0)
73 oauth2!
74 rack (~> 1.2)
75 rake
76 rdoc (>= 5.0, < 7)
77 rspec
78 rspec-pending_for
79 term-ansicolor (< 1.4.0)
80 tins (< 1.7)
81 wwtd
82
83 BUNDLED WITH
84 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 gem 'rack', '~> 1.2'
5
6 group :development do
7 gem 'pry'
8 end
9
10 group :test do
11 gem 'rake'
12 gem 'rspec'
13 gem 'rspec-pending_for'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 backports (3.11.4)
16 coderay (1.1.2)
17 coveralls (0.8.22)
18 json (>= 1.8, < 3)
19 simplecov (~> 0.16.1)
20 term-ansicolor (~> 1.3)
21 thor (~> 0.19.4)
22 tins (~> 1.6)
23 diff-lcs (1.3)
24 docile (1.3.1)
25 faraday (0.9.2)
26 multipart-post (>= 1.2, < 3)
27 json (2.1.0)
28 jwt (1.5.6)
29 method_source (0.9.0)
30 multi_json (1.13.1)
31 multi_xml (0.6.0)
32 multipart-post (2.0.0)
33 pry (0.11.3)
34 coderay (~> 1.1.0)
35 method_source (~> 0.9.0)
36 public_suffix (2.0.5)
37 rack (1.6.10)
38 rake (12.3.1)
39 rdoc (5.1.0)
40 rspec (3.8.0)
41 rspec-core (~> 3.8.0)
42 rspec-expectations (~> 3.8.0)
43 rspec-mocks (~> 3.8.0)
44 rspec-core (3.8.0)
45 rspec-support (~> 3.8.0)
46 rspec-expectations (3.8.2)
47 diff-lcs (>= 1.2.0, < 2.0)
48 rspec-support (~> 3.8.0)
49 rspec-mocks (3.8.0)
50 diff-lcs (>= 1.2.0, < 2.0)
51 rspec-support (~> 3.8.0)
52 rspec-pending_for (0.1.13)
53 rspec-core
54 ruby_engine (~> 1.0)
55 ruby_version (~> 1.0)
56 rspec-support (3.8.0)
57 ruby_engine (1.0.1)
58 ruby_version (1.0.1)
59 simplecov (0.16.1)
60 docile (~> 1.1)
61 json (>= 1.8, < 3)
62 simplecov-html (~> 0.10.0)
63 simplecov-html (0.10.2)
64 term-ansicolor (1.6.0)
65 tins (~> 1.0)
66 thor (0.19.4)
67 tins (1.16.3)
68 wwtd (1.3.0)
69
70 PLATFORMS
71 ruby
72
73 DEPENDENCIES
74 addressable (~> 2.3)
75 backports (~> 3.11)
76 bundler (~> 1.16)
77 coveralls (~> 0.8)
78 faraday (= 0.9.2)
79 oauth2!
80 pry
81 rack (~> 1.2)
82 rake
83 rdoc (>= 5.0, < 7)
84 rspec
85 rspec-pending_for
86 wwtd
87
88 BUNDLED WITH
89 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 gem 'rack', '~> 1.2'
5
6 group :development do
7 gem 'pry'
8 end
9
10 group :test do
11 gem 'rake'
12 gem 'rspec'
13 gem 'rspec-pending_for'
14 gem 'rubocop', '~> 0.53.0'
15 gem 'rubocop-rspec', '~> 1.24.0'
16 end
17
18 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (1.6.10)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (5.1.0)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rack (~> 1.2)
99 rake
100 rdoc (>= 5.0, < 7)
101 rspec
102 rspec-pending_for
103 rubocop (~> 0.53.0)
104 rubocop-rspec (~> 1.24.0)
105 wwtd
106
107 BUNDLED WITH
108 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (2.0.5)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (6.0.4)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rake
99 rdoc (>= 5.0, < 7)
100 rspec
101 rspec-pending_for
102 rubocop (~> 0.53.0)
103 rubocop-rspec (~> 1.24.0)
104 wwtd
105
106 BUNDLED WITH
107 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (2.0.5)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (6.0.4)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rake
99 rdoc (>= 5.0, < 7)
100 rspec
101 rspec-pending_for
102 rubocop (~> 0.53.0)
103 rubocop-rspec (~> 1.24.0)
104 wwtd
105
106 BUNDLED WITH
107 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (2.0.5)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (6.0.4)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rake
99 rdoc (>= 5.0, < 7)
100 rspec
101 rspec-pending_for
102 rubocop (~> 0.53.0)
103 rubocop-rspec (~> 1.24.0)
104 wwtd
105
106 BUNDLED WITH
107 1.16.2
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (2.0.5)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (6.0.4)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rake
99 rdoc (>= 5.0, < 7)
100 rspec
101 rspec-pending_for
102 rubocop (~> 0.53.0)
103 rubocop-rspec (~> 1.24.0)
104 wwtd
105
106 BUNDLED WITH
107 1.16.5
0 source 'https://rubygems.org'
1
2 gem 'faraday', '0.9.2'
3
4 group :development do
5 gem 'pry'
6 end
7
8 group :test do
9 gem 'rake'
10 gem 'rspec'
11 gem 'rspec-pending_for'
12 gem 'rubocop', '~> 0.53.0'
13 gem 'rubocop-rspec', '~> 1.24.0'
14 end
15
16 gemspec :path => '../'
0 PATH
1 remote: ..
2 specs:
3 oauth2 (1.4.0)
4 faraday (>= 0.8, < 0.16.0)
5 jwt (>= 1.0, < 3.0)
6 multi_json (~> 1.3)
7 multi_xml (~> 0.5)
8 rack (>= 1.2, < 3)
9
10 GEM
11 remote: https://rubygems.org/
12 specs:
13 addressable (2.5.2)
14 public_suffix (>= 2.0.2, < 4.0)
15 ast (2.4.0)
16 backports (3.11.4)
17 coderay (1.1.2)
18 coveralls (0.8.22)
19 json (>= 1.8, < 3)
20 simplecov (~> 0.16.1)
21 term-ansicolor (~> 1.3)
22 thor (~> 0.19.4)
23 tins (~> 1.6)
24 diff-lcs (1.3)
25 docile (1.3.1)
26 faraday (0.9.2)
27 multipart-post (>= 1.2, < 3)
28 json (2.1.0)
29 jwt (2.1.0)
30 method_source (0.9.0)
31 multi_json (1.13.1)
32 multi_xml (0.6.0)
33 multipart-post (2.0.0)
34 parallel (1.12.1)
35 parser (2.5.1.2)
36 ast (~> 2.4.0)
37 powerpack (0.1.2)
38 pry (0.11.3)
39 coderay (~> 1.1.0)
40 method_source (~> 0.9.0)
41 public_suffix (3.0.3)
42 rack (2.0.5)
43 rainbow (3.0.0)
44 rake (12.3.1)
45 rdoc (6.0.4)
46 rspec (3.8.0)
47 rspec-core (~> 3.8.0)
48 rspec-expectations (~> 3.8.0)
49 rspec-mocks (~> 3.8.0)
50 rspec-core (3.8.0)
51 rspec-support (~> 3.8.0)
52 rspec-expectations (3.8.2)
53 diff-lcs (>= 1.2.0, < 2.0)
54 rspec-support (~> 3.8.0)
55 rspec-mocks (3.8.0)
56 diff-lcs (>= 1.2.0, < 2.0)
57 rspec-support (~> 3.8.0)
58 rspec-pending_for (0.1.13)
59 rspec-core
60 ruby_engine (~> 1.0)
61 ruby_version (~> 1.0)
62 rspec-support (3.8.0)
63 rubocop (0.53.0)
64 parallel (~> 1.10)
65 parser (>= 2.5)
66 powerpack (~> 0.1)
67 rainbow (>= 2.2.2, < 4.0)
68 ruby-progressbar (~> 1.7)
69 unicode-display_width (~> 1.0, >= 1.0.1)
70 rubocop-rspec (1.24.0)
71 rubocop (>= 0.53.0)
72 ruby-progressbar (1.10.0)
73 ruby_engine (1.0.1)
74 ruby_version (1.0.1)
75 simplecov (0.16.1)
76 docile (~> 1.1)
77 json (>= 1.8, < 3)
78 simplecov-html (~> 0.10.0)
79 simplecov-html (0.10.2)
80 term-ansicolor (1.6.0)
81 tins (~> 1.0)
82 thor (0.19.4)
83 tins (1.16.3)
84 unicode-display_width (1.4.0)
85 wwtd (1.3.0)
86
87 PLATFORMS
88 ruby
89
90 DEPENDENCIES
91 addressable (~> 2.3)
92 backports (~> 3.11)
93 bundler (~> 1.16)
94 coveralls (~> 0.8)
95 faraday (= 0.9.2)
96 oauth2!
97 pry
98 rake
99 rdoc (>= 5.0, < 7)
100 rspec
101 rspec-pending_for
102 rubocop (~> 0.53.0)
103 rubocop-rspec (~> 1.24.0)
104 wwtd
105
106 BUNDLED WITH
107 1.16.4
110110
111111 # No-op since we need the verb and path
112112 # and the MAC always goes in a header
113 def token=(_)
113 def token=(_noop)
114114 end
115115
116116 # Base64.strict_encode64 is not available on Ruby 1.8.7
00 module OAuth2
11 module Version
2 module_function
2 module_function
33
44 # The major version
55 #
1919 #
2020 # @return [Integer]
2121 def patch
22 0
22 1
2323 end
2424
2525 # The pre-release version, if any
3434 # @return [Hash]
3535 def to_h
3636 {
37 :major => major,
38 :minor => minor,
39 :patch => patch,
40 :pre => pre,
37 :major => major,
38 :minor => minor,
39 :patch => patch,
40 :pre => pre,
4141 }
4242 end
4343
44 require 'oauth2/version'
55
66 Gem::Specification.new do |spec|
7 spec.add_dependency 'faraday', ['>= 0.8', '< 0.13']
8 spec.add_dependency 'jwt', '~> 1.0'
7 spec.add_dependency 'faraday', ['>= 0.8', '< 0.16.0']
8 spec.add_dependency 'jwt', ['>= 1.0', '< 3.0']
99 spec.add_dependency 'multi_json', '~> 1.3'
1010 spec.add_dependency 'multi_xml', '~> 0.5'
1111 spec.add_dependency 'rack', ['>= 1.2', '< 3']
12 spec.add_development_dependency 'bundler', '~> 1.0'
13 spec.authors = ['Michael Bleigh', 'Erik Michaels-Ober']
12
13 spec.authors = ['Peter Boling', 'Michael Bleigh', 'Erik Michaels-Ober']
1414 spec.description = 'A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth spec.'
15 spec.email = ['michael@intridea.com', 'sferik@gmail.com']
16 spec.files = %w[.document CONTRIBUTING.md LICENSE.md README.md oauth2.gemspec] + Dir['lib/**/*.rb']
17 spec.homepage = 'http://github.com/intridea/oauth2'
15 spec.email = ['peter.boling@gmail.com']
16 spec.homepage = 'https://github.com/oauth-xx/oauth2'
1817 spec.licenses = %w[MIT]
1918 spec.name = 'oauth2'
20 spec.require_paths = %w[lib]
19 spec.required_ruby_version = '>= 1.9.0'
2120 spec.required_rubygems_version = '>= 1.3.5'
2221 spec.summary = 'A Ruby wrapper for the OAuth 2.0 protocol.'
2322 spec.version = OAuth2::Version
23
24 spec.require_paths = %w[lib]
25 spec.bindir = 'exe'
26 spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27 spec.files = `git ls-files -z`.split("\x0").reject do |f|
28 f.match(%r{^(bin|test|spec|features)/})
29 end
30
31 spec.add_development_dependency 'addressable', '~> 2.3'
32 spec.add_development_dependency 'backports', '~> 3.11'
33 spec.add_development_dependency 'bundler', '~> 1.16'
34 spec.add_development_dependency 'coveralls', '~> 0.8'
35 spec.add_development_dependency 'rake', '~> 12.3'
36 spec.add_development_dependency 'rdoc', ['>= 5.0', '< 7']
37 spec.add_development_dependency 'rspec', '~> 3.0'
38 spec.add_development_dependency 'wwtd'
2439 end
55
66 SimpleCov.start do
77 add_filter '/spec'
8 minimum_coverage(95.33)
8 minimum_coverage(95)
99 end
1010 end
1111
00 require 'helper'
11
22 describe AccessToken do
3 subject { described_class.new(client, token) }
4
35 let(:token) { 'monkey' }
46 let(:refresh_body) { MultiJson.encode(:access_token => 'refreshed_foo', :expires_in => 600, :refresh_token => 'refresh_bar') }
57 let(:client) do
1618 end
1719 end
1820
19 subject { AccessToken.new(client, token) }
20
2121 describe '#initialize' do
2222 it 'assigns client and token' do
2323 expect(subject.client).to eq(client)
2525 end
2626
2727 it 'assigns extra params' do
28 target = AccessToken.new(client, token, 'foo' => 'bar')
28 target = described_class.new(client, token, 'foo' => 'bar')
2929 expect(target.params).to include('foo')
3030 expect(target.params['foo']).to eq('bar')
3131 end
3939
4040 it 'initializes with a Hash' do
4141 hash = {:access_token => token, :expires_at => Time.now.to_i + 200, 'foo' => 'bar'}
42 target = AccessToken.from_hash(client, hash)
42 target = described_class.from_hash(client, hash)
4343 assert_initialized_token(target)
4444 end
4545
46 it 'does not modify opts hash' do
46 it 'from_hash does not modify opts hash' do
4747 hash = {:access_token => token, :expires_at => Time.now.to_i}
4848 hash_before = hash.dup
49 AccessToken.from_hash(client, hash)
49 described_class.from_hash(client, hash)
5050 expect(hash).to eq(hash_before)
5151 end
5252
5353 it 'initalizes with a form-urlencoded key/value string' do
5454 kvform = "access_token=#{token}&expires_at=#{Time.now.to_i + 200}&foo=bar"
55 target = AccessToken.from_kvform(client, kvform)
55 target = described_class.from_kvform(client, kvform)
5656 assert_initialized_token(target)
5757 end
5858
5959 it 'sets options' do
60 target = AccessToken.new(client, token, :param_name => 'foo', :header_format => 'Bearer %', :mode => :body)
60 target = described_class.new(client, token, :param_name => 'foo', :header_format => 'Bearer %', :mode => :body)
6161 expect(target.options[:param_name]).to eq('foo')
6262 expect(target.options[:header_format]).to eq('Bearer %')
6363 expect(target.options[:mode]).to eq(:body)
6666 it 'does not modify opts hash' do
6767 opts = {:param_name => 'foo', :header_format => 'Bearer %', :mode => :body}
6868 opts_before = opts.dup
69 AccessToken.new(client, token, opts)
69 described_class.new(client, token, opts)
7070 expect(opts).to eq(opts_before)
7171 end
7272
7373 it 'initializes with a string expires_at' do
7474 hash = {:access_token => token, :expires_at => '1361396829', 'foo' => 'bar'}
75 target = AccessToken.from_hash(client, hash)
75 target = described_class.from_hash(client, hash)
7676 assert_initialized_token(target)
7777 expect(target.expires_at).to be_a(Integer)
7878 end
7979 end
8080
8181 describe '#request' do
82 context ':mode => :header' do
82 context 'with :mode => :header' do
8383 before do
8484 subject.options[:mode] = :header
8585 end
9191 end
9292 end
9393
94 context ':mode => :query' do
94 context 'with :mode => :query' do
9595 before do
9696 subject.options[:mode] = :query
9797 end
103103 end
104104 end
105105
106 context ':mode => :body' do
106 context 'with :mode => :body' do
107107 before do
108108 subject.options[:mode] = :body
109109 end
118118
119119 describe '#expires?' do
120120 it 'is false if there is no expires_at' do
121 expect(AccessToken.new(client, token)).not_to be_expires
121 expect(described_class.new(client, token)).not_to be_expires
122122 end
123123
124124 it 'is true if there is an expires_in' do
125 expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 600)).to be_expires
125 expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 600)).to be_expires
126126 end
127127
128128 it 'is true if there is an expires_at' do
129 expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => Time.now.getutc.to_i + 600)).to be_expires
129 expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => Time.now.getutc.to_i + 600)).to be_expires
130130 end
131131 end
132132
133133 describe '#expired?' do
134134 it 'is false if there is no expires_in or expires_at' do
135 expect(AccessToken.new(client, token)).not_to be_expired
135 expect(described_class.new(client, token)).not_to be_expired
136136 end
137137
138138 it 'is false if expires_in is in the future' do
139 expect(AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 10_800)).not_to be_expired
139 expect(described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 10_800)).not_to be_expired
140140 end
141141
142142 it 'is true if expires_at is in the past' do
143 access = AccessToken.new(client, token, :refresh_token => 'abaca', :expires_in => 600)
143 access = described_class.new(client, token, :refresh_token => 'abaca', :expires_in => 600)
144144 @now = Time.now + 10_800
145145 allow(Time).to receive(:now).and_return(@now)
146146 expect(access).to be_expired
149149
150150 describe '#refresh!' do
151151 let(:access) do
152 AccessToken.new(client, token, :refresh_token => 'abaca',
153 :expires_in => 600,
154 :param_name => 'o_param')
152 described_class.new(client, token, :refresh_token => 'abaca',
153 :expires_in => 600,
154 :param_name => 'o_param')
155155 end
156156
157157 it 'returns a refresh token with appropriate values carried over' do
174174 describe '#to_hash' do
175175 it 'return a hash equals to the hash used to initialize access token' do
176176 hash = {:access_token => token, :refresh_token => 'foobar', :expires_at => Time.now.to_i + 200, 'foo' => 'bar'}
177 access_token = AccessToken.from_hash(client, hash.clone)
177 access_token = described_class.from_hash(client, hash.clone)
178178 expect(access_token.to_hash).to eq(hash)
179179 end
180180 end
00 require 'helper'
11
22 describe OAuth2::Authenticator do
3 subject do
4 described_class.new(client_id, client_secret, mode)
5 end
6
37 let(:client_id) { 'foo' }
48 let(:client_secret) { 'bar' }
59 let(:mode) { :undefined }
6
7 subject do
8 OAuth2::Authenticator.new(client_id, client_secret, mode)
9 end
1010
1111 it 'raises NotImplementedError for unknown authentication mode' do
1212 expect { subject.apply({}) }.to raise_error(NotImplementedError)
33 require 'nkf'
44
55 describe OAuth2::Client do
6 let!(:error_value) { 'invalid_token' }
7 let!(:error_description_value) { 'bad bad token' }
8
96 subject do
10 OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com') do |builder|
7 described_class.new('abc', 'def', :site => 'https://api.example.com') do |builder|
118 builder.adapter :test do |stub|
129 stub.get('/success') { |env| [200, {'Content-Type' => 'text/awesome'}, 'yay'] }
1310 stub.get('/reflect') { |env| [200, {}, env[:body]] }
2421 end
2522 end
2623
24 let!(:error_value) { 'invalid_token' }
25 let!(:error_description_value) { 'bad bad token' }
26
2727 describe '#initialize' do
2828 it 'assigns id and secret' do
2929 expect(subject.id).to eq('abc')
5050
5151 expect(builder).to receive(:adapter).with(:test)
5252
53 OAuth2::Client.new('abc', 'def') do |client|
53 described_class.new('abc', 'def') do |client|
5454 client.adapter :test
5555 end.connection
5656 end
6060 end
6161
6262 it 'allows true/false for raise_errors option' do
63 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => false)
63 client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => false)
6464 expect(client.options[:raise_errors]).to be false
65 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true)
65 client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true)
6666 expect(client.options[:raise_errors]).to be true
6767 end
6868
6969 it 'allows override of raise_errors option' do
70 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) do |builder|
70 client = described_class.new('abc', 'def', :site => 'https://api.example.com', :raise_errors => true) do |builder|
7171 builder.adapter :test do |stub|
7272 stub.get('/notfound') { |env| [404, {}, nil] }
7373 end
7979 end
8080
8181 it 'allows get/post for access_token_method option' do
82 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :get)
82 client = described_class.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :get)
8383 expect(client.options[:access_token_method]).to eq(:get)
84 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :post)
84 client = described_class.new('abc', 'def', :site => 'https://api.example.com', :access_token_method => :post)
8585 expect(client.options[:access_token_method]).to eq(:post)
8686 end
8787
8888 it 'does not mutate the opts hash argument' do
8989 opts = {:site => 'http://example.com/'}
9090 opts2 = opts.dup
91 OAuth2::Client.new 'abc', 'def', opts
91 described_class.new 'abc', 'def', opts
9292 expect(opts).to eq(opts2)
9393 end
9494 end
127127 end
128128
129129 it 'does not add the redirect_uri param to the auth_code token exchange request' do
130 client = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com') do |builder|
130 client = described_class.new('abc', 'def', :site => 'https://api.example.com') do |builder|
131131 builder.adapter :test do |stub|
132132 stub.post('/oauth/token', auth_code_params) do
133133 [200, {'Content-Type' => 'application/json'}, '{"access_token":"token"}']
146146 end
147147
148148 it 'adds the redirect_uri param to the auth_code token exchange request' do
149 client = OAuth2::Client.new('abc', 'def', :redirect_uri => 'https://site.com/oauth/callback', :site => 'https://api.example.com') do |builder|
149 client = described_class.new('abc', 'def', :redirect_uri => 'https://site.com/oauth/callback', :site => 'https://api.example.com') do |builder|
150150 builder.adapter :test do |stub|
151151 stub.post('/oauth/token', auth_code_params.merge('redirect_uri' => 'https://site.com/oauth/callback')) do
152152 [200, {'Content-Type' => 'application/json'}, '{"access_token":"token"}']
224224 it 're-encodes response body in the error message' do
225225 begin
226226 subject.request(:get, '/ascii_8bit_encoding')
227 rescue => ex
227 rescue StandardError => ex
228228 expect(ex.message.encoding.name).to eq('UTF-8')
229229 expect(ex.message).to eq("invalid_request: é\n{\"error\":\"invalid_request\",\"error_description\":\"��\"}")
230230 end
301301
302302 context 'with SSL options' do
303303 subject do
304 cli = OAuth2::Client.new('abc', 'def', :site => 'https://api.example.com', :ssl => {:ca_file => 'foo.pem'})
304 cli = described_class.new('abc', 'def', :site => 'https://api.example.com', :ssl => {:ca_file => 'foo.pem'})
305305 cli.connection.build do |b|
306306 b.adapter :test
307307 end
00 require 'helper'
11
22 describe MACToken do
3 subject { described_class.new(client, token, 'abc123') }
4
35 let(:token) { 'monkey' }
46 let(:client) do
57 Client.new('abc', 'def', :site => 'https://api.example.com') do |builder|
1113 end
1214 end
1315 end
14
15 subject { MACToken.new(client, token, 'abc123') }
1616
1717 describe '#initialize' do
1818 it 'assigns client and token' do
2929 end
3030
3131 it 'handles hmac-sha-256' do
32 mac = MACToken.new(client, token, 'abc123', :algorithm => 'hmac-sha-256')
32 mac = described_class.new(client, token, 'abc123', :algorithm => 'hmac-sha-256')
3333 expect(mac.algorithm).to be_instance_of(OpenSSL::Digest::SHA256)
3434 end
3535
3636 it 'handles hmac-sha-1' do
37 mac = MACToken.new(client, token, 'abc123', :algorithm => 'hmac-sha-1')
37 mac = described_class.new(client, token, 'abc123', :algorithm => 'hmac-sha-1')
3838 expect(mac.algorithm).to be_instance_of(OpenSSL::Digest::SHA1)
3939 end
4040
4141 it 'raises on improper algorithm' do
42 expect { MACToken.new(client, token, 'abc123', :algorithm => 'invalid-sha') }.to raise_error(ArgumentError)
42 expect { described_class.new(client, token, 'abc123', :algorithm => 'invalid-sha') }.to raise_error(ArgumentError)
4343 end
4444 end
4545
5656 header = subject.header('get', 'https://www.example.com/hello')
5757 duplicate_header = subject.header('get', 'https://www.example.com/hello')
5858
59 expect(header).to_not eq(duplicate_header)
59 expect(header).not_to eq(duplicate_header)
6060 end
6161
6262 it 'generates the proper format' do
8787 end
8888
8989 describe '.from_access_token' do
90 subject { described_class.from_access_token(access_token, 'hello') }
91
9092 let(:access_token) do
9193 AccessToken.new(
9294 client, token,
9698 :random => 1
9799 )
98100 end
99
100 subject { MACToken.from_access_token(access_token, 'hello') }
101101
102102 it 'initializes client, token, and secret properly' do
103103 expect(subject.client).to eq(client)
2222 :status => 200,
2323 :body => 'baz')
2424 end
25
2526 before do
26 OAuth2::Response.register_parser(:foobar, 'application/foo-bar') do |body|
27 described_class.register_parser(:foobar, 'application/foo-bar') do |body|
2728 "foobar #{body}"
2829 end
2930 end
3031
3132 it 'adds to the content types and parsers' do
32 expect(OAuth2::Response.send(:class_variable_get, :@@parsers).keys).to include(:foobar)
33 expect(OAuth2::Response.send(:class_variable_get, :@@content_types).keys).to include('application/foo-bar')
33 expect(described_class.send(:class_variable_get, :@@parsers).keys).to include(:foobar)
34 expect(described_class.send(:class_variable_get, :@@content_types).keys).to include('application/foo-bar')
3435 end
3536
3637 it 'is able to parse that content type automatically' do
37 expect(OAuth2::Response.new(response).parsed).to eq('foobar baz')
38 expect(described_class.new(response).parsed).to eq('foobar baz')
3839 end
3940 end
4041
7475 end
7576 end
7677
77 context 'xml parser registration' do
78 context 'with xml parser registration' do
7879 it 'tries to load multi_xml and use it' do
79 expect(OAuth2::Response.send(:class_variable_get, :@@parsers)[:xml]).not_to be_nil
80 expect(described_class.send(:class_variable_get, :@@parsers)[:xml]).not_to be_nil
8081 end
8182
8283 it 'is able to parse xml' do
8485 body = '<?xml version="1.0" standalone="yes" ?><foo><bar>baz</bar></foo>'
8586
8687 response = double('response', :headers => headers, :body => body)
87 expect(OAuth2::Response.new(response).parsed).to eq('foo' => {'bar' => 'baz'})
88 expect(described_class.new(response).parsed).to eq('foo' => {'bar' => 'baz'})
8889 end
8990 end
9091 end
00 require 'helper'
11
22 describe OAuth2::Strategy::Assertion do
3 subject { client.assertion }
4
35 let(:client) do
46 cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com')
57 cli.connection.build do |b|
1820 end
1921
2022 let(:params) { {:hmac_secret => 'foo'} }
21
22 subject { client.assertion }
2323
2424 describe '#authorize_url' do
2525 it 'raises NotImplementedError' do
22 require 'helper'
33
44 describe OAuth2::Strategy::AuthCode do
5 subject { client.auth_code }
6
57 let(:code) { 'sushi' }
68 let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout&extra_param=steve' }
79 let(:facebook_token) { kvform_token.gsub('_in', '') }
3436 end
3537 end
3638
37 subject { client.auth_code }
38
3939 describe '#authorize_url' do
4040 it 'includes the client_id' do
4141 expect(subject.authorize_url).to include('client_id=abc')
5959 client.options[:token_method] = :post
6060 end
6161
62 it 'should not raise an error' do
63 expect { subject.get_token(code) }.to_not raise_error
62 it 'does not raise an error' do
63 expect { subject.get_token(code) }.not_to raise_error
6464 end
6565
66 it 'should not create an error instance' do
67 expect(OAuth2::Error).to_not receive(:new)
66 it 'does not create an error instance' do
67 expect(OAuth2::Error).not_to receive(:new)
6868
6969 subject.get_token(code)
7070 end
11
22 describe OAuth2::Strategy::Base do
33 it 'initializes with a Client' do
4 expect { OAuth2::Strategy::Base.new(OAuth2::Client.new('abc', 'def')) }.not_to raise_error
4 expect { described_class.new(OAuth2::Client.new('abc', 'def')) }.not_to raise_error
55 end
66 end
00 require 'helper'
11
22 describe OAuth2::Strategy::ClientCredentials do
3 subject { client.client_credentials }
4
35 let(:kvform_token) { 'expires_in=600&access_token=salmon&refresh_token=trout' }
46 let(:json_token) { '{"expires_in":600,"access_token":"salmon","refresh_token":"trout"}' }
57
2729 end
2830 end
2931 end
30
31 subject { client.client_credentials }
3232
3333 describe '#authorize_url' do
3434 it 'raises NotImplementedError' do
00 require 'helper'
11
22 describe OAuth2::Strategy::Implicit do
3 subject { client.implicit }
4
35 let(:client) { OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com') }
4
5 subject { client.implicit }
66
77 describe '#authorize_url' do
88 it 'includes the client_id' do
00 require 'helper'
11
22 describe OAuth2::Strategy::Password do
3 subject { client.password }
4
35 let(:client) do
46 cli = OAuth2::Client.new('abc', 'def', :site => 'http://api.example.com')
57 cli.connection.build do |b|
1618 end
1719 cli
1820 end
19 subject { client.password }
2021
2122 describe '#authorize_url' do
2223 it 'raises NotImplementedError' do