access_token_agent 3.1.1 → 3.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.gitlab-ci.yml +54 -0
- data/.rspec +1 -0
- data/.rubocop.yml +27 -11
- data/CHANGELOG.md +28 -0
- data/Gemfile +1 -1
- data/README.md +39 -12
- data/access_token_agent.gemspec +17 -13
- data/bin/console +11 -0
- data/lib/access_token_agent.rb +1 -0
- data/lib/access_token_agent/connector.rb +39 -10
- data/lib/access_token_agent/error.rb +3 -1
- data/lib/access_token_agent/missing_access_token.rb +7 -0
- data/lib/access_token_agent/missing_token_type.rb +7 -0
- data/lib/access_token_agent/token.rb +17 -4
- data/lib/access_token_agent/unsupported_token_type_error.rb +7 -0
- data/lib/access_token_agent/version.rb +3 -0
- metadata +43 -33
- data/.ruby-version +0 -1
- data/.travis.yml +0 -4
- data/lib/access_token_agent/invalid_token_type_error.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ce5b9bb39e762a8602e908ed0fd3f90a5a90a1ab5692b37512fd51fca5ffcbc
|
4
|
+
data.tar.gz: eb3bec64d9424a5197fc19e93ae26dd0d59f29a33fe3f1141dbffeed5e28ac9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6d2d273fb9013401936d16db02677ca8f84e843fe1634d79a2e03edab29eac96ee395d73275640177d610974bf652c1fe44303484d6150c22596db914118ee5
|
7
|
+
data.tar.gz: 1395a40b82a22e93cd3ff04b7b61fb56d5c76a281dc567f5713a5e3cdbec6558d545c506668f51ee7a374b277576b6bd8b931b0ecf64c6b470d5381f82250304
|
data/.gitignore
CHANGED
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
image: ruby:2.7
|
2
|
+
|
3
|
+
stages:
|
4
|
+
- test
|
5
|
+
- publish
|
6
|
+
|
7
|
+
before_script:
|
8
|
+
- bundle config jobs 8
|
9
|
+
- bundle install --path=/tmp/bundler --quiet
|
10
|
+
|
11
|
+
rubocop:
|
12
|
+
stage: test
|
13
|
+
image: ruby:2.2
|
14
|
+
script:
|
15
|
+
- bundle exec rubocop
|
16
|
+
|
17
|
+
rspec_latest:
|
18
|
+
stage: test
|
19
|
+
image: ruby
|
20
|
+
script:
|
21
|
+
- bundle exec rspec
|
22
|
+
|
23
|
+
rspec_2.6:
|
24
|
+
stage: test
|
25
|
+
image: ruby:2.6
|
26
|
+
script:
|
27
|
+
- bundle exec rspec
|
28
|
+
|
29
|
+
rspec_2.5:
|
30
|
+
stage: test
|
31
|
+
image: ruby:2.5
|
32
|
+
script:
|
33
|
+
- bundle exec rspec
|
34
|
+
|
35
|
+
rspec_2.2:
|
36
|
+
stage: test
|
37
|
+
image: ruby:2.2
|
38
|
+
script:
|
39
|
+
- bundle exec rspec
|
40
|
+
|
41
|
+
publish_gem:
|
42
|
+
stage: publish
|
43
|
+
script:
|
44
|
+
- mkdir -p ~/.gem
|
45
|
+
- |
|
46
|
+
cat << EOF > ~/.gem/credentials
|
47
|
+
---
|
48
|
+
:rubygems_api_key: ${RUBYGEMS_API_KEY}
|
49
|
+
EOF
|
50
|
+
- chmod 0600 ~/.gem/credentials
|
51
|
+
- gem build access_token_agent.gemspec
|
52
|
+
- gem push $(find `pwd` -name "access_token_agent-*.gem")
|
53
|
+
only:
|
54
|
+
- master
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
CHANGED
@@ -1,28 +1,44 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.1
|
3
2
|
Exclude:
|
3
|
+
- 'bin/**/*'
|
4
4
|
- 'db/schema.rb'
|
5
5
|
- 'doc/**/*'
|
6
|
-
- '
|
7
|
-
- '
|
6
|
+
- 'docker_app/**/*'
|
7
|
+
- 'Guardfile'
|
8
|
+
- 'tmp/**/*'
|
9
|
+
- 'vendor/**/*'
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
# We need to configure exemptions for blocks that we generally accept to be
|
12
|
+
# long, since they are less comparable to methods and more comparable to
|
13
|
+
# modules/classes.
|
14
|
+
Metrics/BlockLength:
|
15
|
+
ExcludedMethods:
|
16
|
+
- context
|
17
|
+
- describe
|
18
|
+
- namespace
|
19
|
+
Exclude:
|
20
|
+
- 'config/environments/*.rb' # instead of excluding all :configure methods
|
21
|
+
- 'config/routes.rb'
|
22
|
+
|
23
|
+
# The maximum amount of positional arguments in a method really shouldn't exceed
|
24
|
+
# the rubocop default of 5.
|
25
|
+
# However, keyword arguments do not make a method signature as unreadable as positional
|
26
|
+
# arguments. There are valid cases for longer argument lists (e.g. data objects or
|
27
|
+
# DSLs with implicit default values).
|
28
|
+
# In those cases keyword args provide a good balance between readability and the need to
|
29
|
+
# pass more arguments into an object.
|
30
|
+
Metrics/ParameterLists:
|
31
|
+
CountKeywordArgs: false
|
11
32
|
|
12
33
|
Style/Documentation:
|
13
34
|
Enabled: false
|
14
35
|
|
15
|
-
# Encoding comments are not neccessary in all 2.x versions of ruby, since
|
16
|
-
# UTF-8 has become the default encoding.
|
17
|
-
Style/Encoding:
|
18
|
-
EnforcedStyle: never
|
19
|
-
Enabled: true
|
20
|
-
|
21
36
|
# This cop tries to make you use module_funtion instead of extend self
|
22
37
|
# This is bad because both have their own use-case and should not be used
|
23
38
|
# and sometimes cannot be used to do the same thing
|
24
39
|
Style/ModuleFunction:
|
25
40
|
Enabled: false
|
41
|
+
|
26
42
|
# While it is very often useful to separate numbers after every three digits
|
27
43
|
# for readability, this mostly doesn't make sense if the number doesn't
|
28
44
|
# represent an amount but rather an identifier. Thus the use of underscores
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
## 3.5.0
|
2
|
+
|
3
|
+
- Support requesting scopes
|
4
|
+
- Add requirement for Ruby 2.2 to gemspec (this was an implicit requirement before)
|
5
|
+
|
6
|
+
## 3.4.0
|
7
|
+
|
8
|
+
- Allows value of `token_type` to have any casing
|
9
|
+
|
10
|
+
## 3.3.0
|
11
|
+
|
12
|
+
- Add `instance` accessor to `AccessTokenAgent::Connector`
|
13
|
+
|
14
|
+
## 3.2.1
|
15
|
+
|
16
|
+
- Use a string as key in HTTP headers, to be compatible with Ruby < 2.3
|
17
|
+
|
18
|
+
## 3.2.0
|
19
|
+
|
20
|
+
- Add `http_auth_header` method to the connector, since this is the most
|
21
|
+
common use case
|
22
|
+
- Deprecate the `authenticate` method in favor of the new `token` method
|
23
|
+
- Allow to configure from which path to get the access token
|
24
|
+
- Put all errors into the AccessTokenAgent namespace
|
25
|
+
- Actually return a token when faking auth
|
26
|
+
- Rename error raised for unsupported token types
|
27
|
+
- Ensure that access token response carries an access token
|
28
|
+
|
1
29
|
## 3.1.1
|
2
30
|
|
3
31
|
- Fix broken gem release (missing files)
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/access_token_agent.svg)](https://badge.fury.io/rb/access_token_agent)
|
2
2
|
|
3
3
|
# AccessTokenAgent
|
4
4
|
|
@@ -12,19 +12,19 @@ OAuth2 [client credentials flow](https://tools.ietf.org/html/rfc6749#section-4.4
|
|
12
12
|
Add this line to your application's Gemfile:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem 'access_token_agent', '~> 3.
|
15
|
+
gem 'access_token_agent', '~> 3.4'
|
16
16
|
```
|
17
17
|
|
18
18
|
And then execute:
|
19
19
|
|
20
20
|
$ bundle
|
21
21
|
|
22
|
-
##
|
22
|
+
## Basic configuration
|
23
23
|
|
24
24
|
Create an instance of AccessTokenAgent::Connector with the desired
|
25
25
|
configuration and use that instance to authenticate.
|
26
26
|
|
27
|
-
Needs the following parameters:
|
27
|
+
Needs the following parameters to instantiate:
|
28
28
|
|
29
29
|
* `host` - the server address where the auth provider is running.
|
30
30
|
* `client_id` - the client_id of the application using this gem.
|
@@ -33,23 +33,41 @@ Needs the following parameters:
|
|
33
33
|
Optional parameters:
|
34
34
|
|
35
35
|
* `fake_auth` - if true, do not connect to the auth service and return
|
36
|
-
|
36
|
+
a faked access token.
|
37
|
+
* `access_token_path` - Allows to customize the HTTP path where the
|
38
|
+
access token needs to be requested.
|
39
|
+
**Default:** `/oauth/token`
|
40
|
+
* `scopes` - An array of scopes to be requested from the authorization server
|
41
|
+
**Default:** no scopes
|
37
42
|
|
38
43
|
### Example
|
39
44
|
|
40
45
|
```ruby
|
41
|
-
AccessTokenAgent::Connector.new(host: 'https://auth.kaeuferportal.de',
|
42
|
-
|
43
|
-
|
46
|
+
@connector = AccessTokenAgent::Connector.new(host: 'https://auth.kaeuferportal.de',
|
47
|
+
client_id: 'my_client',
|
48
|
+
client_secret: 'very_secure_and_secret')
|
44
49
|
```
|
45
50
|
|
46
|
-
##
|
51
|
+
## Sharing a connector
|
52
|
+
|
53
|
+
When connecting to multiple endpoints you will commonly come across the need
|
54
|
+
to share a single instance of a connector in multiple places, because your
|
55
|
+
application will use the same configuration everywhere.
|
47
56
|
|
48
|
-
|
49
|
-
authenticate on it to receive your access_token.
|
57
|
+
You can use the convenience accessor `instance` for that:
|
50
58
|
|
59
|
+
```ruby
|
60
|
+
AccessTokenAgent::Connector.instance = AccessTokenAgent::Connector.new(...)
|
51
61
|
```
|
52
|
-
|
62
|
+
|
63
|
+
## Usage
|
64
|
+
|
65
|
+
Set up an AcccessTokenAgent::Connector instance (see Configuration) and call
|
66
|
+
`authenticate` on it to receive your access_token.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
AccessTokenAgent::Connector.instance.authenticate
|
70
|
+
=> "XYZ"
|
53
71
|
```
|
54
72
|
|
55
73
|
When no valid AccessToken is present a call to authenticate returns one of the
|
@@ -62,3 +80,12 @@ following:
|
|
62
80
|
As long as a valid AccessToken is present a call to authenticate simply returns
|
63
81
|
that AccessToken. An AccessToken is valid for a limited time. The exact value is
|
64
82
|
determined by the auth response which contains an `expires_at` parameter.
|
83
|
+
|
84
|
+
### As HTTP Header
|
85
|
+
|
86
|
+
Since the most common use case is to include the access token as [RFC 6750](https://tools.ietf.org/html/rfc6750) bearer token, there is a method that returns the `Authorization: Bearer XYZ` header as hash:
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
AccessTokenAgent::Connector.instance.http_auth_header
|
90
|
+
=> { "Authorization" => "Bearer XYZ" }
|
91
|
+
```
|
data/access_token_agent.gemspec
CHANGED
@@ -1,24 +1,28 @@
|
|
1
|
-
|
1
|
+
lib = File.expand_path('../lib', __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'access_token_agent/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
6
|
s.name = 'access_token_agent'
|
5
|
-
s.version =
|
6
|
-
s.date = '
|
7
|
+
s.version = AccessTokenAgent::VERSION
|
8
|
+
s.date = '2020-10-02'
|
7
9
|
s.summary = 'Handles authentication against an OAuth2 provider'
|
8
|
-
s.homepage = 'https://github.com/
|
9
|
-
s.description = 'Retrieves an access token from an OAuth2 provider' \
|
10
|
+
s.homepage = 'https://github.com/aroundhome/access_token_agent'
|
11
|
+
s.description = 'Retrieves an access token from an OAuth2 provider ' \
|
10
12
|
'using the supplied credentials.'
|
11
|
-
s.authors = ['
|
12
|
-
s.email = 'oss@
|
13
|
+
s.authors = ['be Around GmbH']
|
14
|
+
s.email = 'oss@aroundhome.de'
|
13
15
|
s.license = 'MIT'
|
14
16
|
s.files = `git ls-files -z`.split("\x0")
|
15
17
|
.reject { |f| f.match(%r{^spec/}) }
|
16
18
|
|
17
|
-
s.
|
18
|
-
|
19
|
+
s.required_ruby_version = '>= 2.2'
|
20
|
+
|
21
|
+
s.add_development_dependency 'bundler', '> 1.11', '< 3'
|
19
22
|
s.add_development_dependency 'pry', '~> 0.10'
|
20
|
-
s.add_development_dependency '
|
21
|
-
s.add_development_dependency '
|
22
|
-
s.add_development_dependency '
|
23
|
-
s.add_development_dependency '
|
23
|
+
s.add_development_dependency 'rspec', '~> 3.4'
|
24
|
+
s.add_development_dependency 'rubocop', '0.51'
|
25
|
+
s.add_development_dependency 'simplecov', '~> 0.16'
|
26
|
+
s.add_development_dependency 'vcr', '~> 5.0'
|
27
|
+
s.add_development_dependency 'webmock', '~> 3.0'
|
24
28
|
end
|
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'access_token_agent'
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
require 'pry'
|
11
|
+
Pry.start
|
data/lib/access_token_agent.rb
CHANGED
@@ -2,28 +2,51 @@ require 'net/http'
|
|
2
2
|
|
3
3
|
module AccessTokenAgent
|
4
4
|
class Connector
|
5
|
+
FAKE_TOKEN = 'FakeAuthToken'.freeze
|
6
|
+
|
7
|
+
class << self
|
8
|
+
attr_accessor :instance
|
9
|
+
end
|
10
|
+
|
5
11
|
def initialize(host:,
|
6
12
|
client_id:,
|
7
13
|
client_secret:,
|
8
|
-
fake_auth: false
|
14
|
+
fake_auth: false,
|
15
|
+
access_token_path: '/oauth/token',
|
16
|
+
scopes: nil)
|
9
17
|
@host = host
|
10
18
|
@client_id = client_id
|
11
19
|
@client_secret = client_secret
|
12
20
|
@fake_auth = fake_auth
|
21
|
+
@access_token_path = access_token_path
|
22
|
+
@scopes = scopes
|
13
23
|
end
|
14
24
|
|
15
|
-
def
|
16
|
-
|
17
|
-
|
25
|
+
def http_auth_header
|
26
|
+
{ 'Authorization' => "Bearer #{token}" }
|
27
|
+
end
|
28
|
+
|
29
|
+
def token
|
30
|
+
return FAKE_TOKEN if @fake_auth
|
31
|
+
@known_token = fetch_token unless @known_token && @known_token.valid?
|
32
|
+
|
18
33
|
@known_token.value
|
19
34
|
end
|
20
35
|
|
36
|
+
def authenticate
|
37
|
+
warn "[DEPRECATION] `#{self.class}.authenticate` is deprecated. " \
|
38
|
+
'Use `token` instead.'
|
39
|
+
token
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
21
44
|
def fetch_token
|
22
|
-
|
45
|
+
Token.new(fetch_token_hash)
|
23
46
|
end
|
24
47
|
|
25
|
-
def
|
26
|
-
response =
|
48
|
+
def fetch_token_hash
|
49
|
+
response = perform_request
|
27
50
|
case response.code
|
28
51
|
when '200' then JSON.parse(response.body)
|
29
52
|
when '401' then raise UnauthorizedError
|
@@ -34,10 +57,10 @@ module AccessTokenAgent
|
|
34
57
|
raise ConnectionError
|
35
58
|
end
|
36
59
|
|
37
|
-
def
|
60
|
+
def perform_request
|
38
61
|
request = Net::HTTP::Post.new(auth_uri)
|
39
62
|
request.basic_auth @client_id, @client_secret
|
40
|
-
request.form_data =
|
63
|
+
request.form_data = form_data
|
41
64
|
use_tls = auth_uri.scheme == 'https'
|
42
65
|
Net::HTTP.start(auth_uri.hostname,
|
43
66
|
auth_uri.port,
|
@@ -47,7 +70,13 @@ module AccessTokenAgent
|
|
47
70
|
end
|
48
71
|
|
49
72
|
def auth_uri
|
50
|
-
@auth_uri ||= URI("#{@host}
|
73
|
+
@auth_uri ||= URI("#{@host}#{@access_token_path}")
|
74
|
+
end
|
75
|
+
|
76
|
+
def form_data
|
77
|
+
result = { 'grant_type' => 'client_credentials' }
|
78
|
+
result['scope'] = @scopes.join(' ') if @scopes
|
79
|
+
result
|
51
80
|
end
|
52
81
|
end
|
53
82
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
-
require 'access_token_agent/
|
1
|
+
require 'access_token_agent/missing_access_token'
|
2
|
+
require 'access_token_agent/missing_token_type'
|
3
|
+
require 'access_token_agent/unsupported_token_type_error'
|
2
4
|
|
3
5
|
module AccessTokenAgent
|
4
6
|
class Token
|
@@ -7,9 +9,8 @@ module AccessTokenAgent
|
|
7
9
|
EXPIRY_MARGIN = 60 # seconds
|
8
10
|
|
9
11
|
def initialize(auth_response)
|
10
|
-
|
11
|
-
|
12
|
-
end
|
12
|
+
validate_response(auth_response)
|
13
|
+
|
13
14
|
@value = auth_response['access_token']
|
14
15
|
@expires_at = Time.now + auth_response['expires_in']
|
15
16
|
end
|
@@ -17,5 +18,17 @@ module AccessTokenAgent
|
|
17
18
|
def valid?
|
18
19
|
@expires_at - EXPIRY_MARGIN > Time.now
|
19
20
|
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def validate_response(auth_response)
|
25
|
+
raise MissingTokenType if auth_response['token_type'].nil?
|
26
|
+
unless auth_response['token_type'].downcase == 'bearer'
|
27
|
+
raise UnsupportedTokenTypeError, auth_response['token_type']
|
28
|
+
end
|
29
|
+
|
30
|
+
token = auth_response['access_token']
|
31
|
+
raise MissingAccessToken if token.nil? || token.empty?
|
32
|
+
end
|
20
33
|
end
|
21
34
|
end
|
metadata
CHANGED
@@ -1,136 +1,147 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: access_token_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- be Around GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.11'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.11'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
34
|
+
name: pry
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
39
|
+
version: '0.10'
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '0.10'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
48
|
+
name: rspec
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '3.4'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '3.4'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rubocop
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- -
|
65
|
+
- - '='
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
67
|
+
version: '0.51'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- -
|
72
|
+
- - '='
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
74
|
+
version: '0.51'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
76
|
+
name: simplecov
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
81
|
+
version: '0.16'
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
88
|
+
version: '0.16'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
90
|
+
name: vcr
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
93
|
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
95
|
+
version: '5.0'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
100
|
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
102
|
+
version: '5.0'
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
104
|
+
name: webmock
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|
100
106
|
requirements:
|
101
107
|
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0
|
109
|
+
version: '3.0'
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
114
|
- - "~>"
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
111
|
-
description: Retrieves an access token from an OAuth2
|
112
|
-
|
116
|
+
version: '3.0'
|
117
|
+
description: Retrieves an access token from an OAuth2 provider using the supplied
|
118
|
+
credentials.
|
119
|
+
email: oss@aroundhome.de
|
113
120
|
executables: []
|
114
121
|
extensions: []
|
115
122
|
extra_rdoc_files: []
|
116
123
|
files:
|
117
124
|
- ".gitignore"
|
125
|
+
- ".gitlab-ci.yml"
|
126
|
+
- ".rspec"
|
118
127
|
- ".rubocop.yml"
|
119
|
-
- ".ruby-version"
|
120
|
-
- ".travis.yml"
|
121
128
|
- CHANGELOG.md
|
122
129
|
- Gemfile
|
123
130
|
- LICENSE.md
|
124
131
|
- README.md
|
125
132
|
- access_token_agent.gemspec
|
133
|
+
- bin/console
|
126
134
|
- lib/access_token_agent.rb
|
127
135
|
- lib/access_token_agent/connection_error.rb
|
128
136
|
- lib/access_token_agent/connector.rb
|
129
137
|
- lib/access_token_agent/error.rb
|
130
|
-
- lib/access_token_agent/
|
138
|
+
- lib/access_token_agent/missing_access_token.rb
|
139
|
+
- lib/access_token_agent/missing_token_type.rb
|
131
140
|
- lib/access_token_agent/token.rb
|
132
141
|
- lib/access_token_agent/unauthorized_error.rb
|
133
|
-
|
142
|
+
- lib/access_token_agent/unsupported_token_type_error.rb
|
143
|
+
- lib/access_token_agent/version.rb
|
144
|
+
homepage: https://github.com/aroundhome/access_token_agent
|
134
145
|
licenses:
|
135
146
|
- MIT
|
136
147
|
metadata: {}
|
@@ -142,15 +153,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
153
|
requirements:
|
143
154
|
- - ">="
|
144
155
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
156
|
+
version: '2.2'
|
146
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
158
|
requirements:
|
148
159
|
- - ">="
|
149
160
|
- !ruby/object:Gem::Version
|
150
161
|
version: '0'
|
151
162
|
requirements: []
|
152
|
-
|
153
|
-
rubygems_version: 2.2.5
|
163
|
+
rubygems_version: 3.1.4
|
154
164
|
signing_key:
|
155
165
|
specification_version: 4
|
156
166
|
summary: Handles authentication against an OAuth2 provider
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.10
|
data/.travis.yml
DELETED