warden-cognito 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +32 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +8 -0
- data/Dockerfile +8 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/README.md +74 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +9 -0
- data/lib/warden/cognito.rb +26 -0
- data/lib/warden/cognito/authenticatable_strategy.rb +64 -0
- data/lib/warden/cognito/cognito_client.rb +29 -0
- data/lib/warden/cognito/token_authenticatable_strategy.rb +107 -0
- data/lib/warden/cognito/user_helper.rb +21 -0
- data/lib/warden/cognito/version.rb +5 -0
- data/warden-cognito.gemspec +48 -0
- metadata +236 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bf59a14b691d78eb16f048087c84307efd4a37789d2f85fe5100523571fcc134
|
4
|
+
data.tar.gz: 0be9c19501448ac6d78498e1570c3e2d763726463ab672d6b4194a5f3836ebf3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 19570e460e1d0d19b7e8c13d6bef79effaf77abb9770b48c0806bdd156e6357072f670b28cd8044d2ae34cb3f4ad822329942a9b860c7f636889fcb9b7a96b55
|
7
|
+
data.tar.gz: 8170cedc239e47cf814e8ec2fdb5e5a5c89b63443593fcd155a6de440440de5d5c061d3218f211f49bd9b43acbb6885afcd1acd13b403e5438893f8b941c3df3
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- 'bin/*'
|
4
|
+
- 'db/**/*'
|
5
|
+
|
6
|
+
Style/FrozenStringLiteralComment:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
Metrics/LineLength:
|
10
|
+
AutoCorrect: true
|
11
|
+
Max: 120
|
12
|
+
|
13
|
+
Metrics/BlockLength:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Metrics/AbcSize:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Metrics/CyclomaticComplexity:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Metrics/MethodLength:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Metrics/PerceivedComplexity:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/Documentation:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/MultilineBlockChain:
|
32
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.6.5
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## [Unreleased]
|
8
|
+
- Scratching the gem
|
data/Dockerfile
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Juan F. Pérez
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Warden::Cognito
|
2
|
+
|
3
|
+
[![Codeship Status for barkibu/warden-cognito](https://app.codeship.com/projects/f305e0e4-e1e3-40ef-90b3-ab7475ed480c/status?branch=master)](https://app.codeship.com/projects/417617)
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/warden/cognito`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'warden-cognito'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install warden-cognito
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
|
28
|
+
Add to your initializers the following:
|
29
|
+
```ruby
|
30
|
+
Warden::Cognito.configure do |config|
|
31
|
+
config.user_repository = User
|
32
|
+
config.identifying_attribute = 'sub'
|
33
|
+
config.after_local_user_not_found = ->(cognito_user) { User.create(username: cognito_user.username) }
|
34
|
+
config.cache = ActiveSupport::Cache::MemCacheStore.new
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
### User Repository
|
39
|
+
|
40
|
+
The user repository will be used to look for an entity to mark as authenticated, it must implement the following:
|
41
|
+
- `find_by_cognito_username` that should return the user identified by the given username or nil
|
42
|
+
- `find_by_cognito_attribute` that should return the user identified by the given Cognito User attribute (`config.identifying_attribute`) or nil
|
43
|
+
|
44
|
+
### `after_local_user_not_found` Callback
|
45
|
+
|
46
|
+
A callback triggered whenever the user correctly authenticated on Cognito but no local user exists (receives the full [cognito user](https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CognitoIdentityProvider/Types/GetUserResponse.html))
|
47
|
+
|
48
|
+
### Cache
|
49
|
+
The cache used to store the AWS Json Web Keys as well as the mapping between local and remote identifiers.
|
50
|
+
Defaults to `ActiveSupport::Cache::NullStore`
|
51
|
+
|
52
|
+
## Development
|
53
|
+
|
54
|
+
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.
|
55
|
+
|
56
|
+
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).
|
57
|
+
|
58
|
+
### With Docker
|
59
|
+
|
60
|
+
There are docker and docker-compose files configured to create a development environment for this gem. So, if you use Docker you only need to run:
|
61
|
+
|
62
|
+
`docker-compose up -d`
|
63
|
+
|
64
|
+
An then, for example:
|
65
|
+
|
66
|
+
`docker-compose exec app rspec`
|
67
|
+
|
68
|
+
## Contributing
|
69
|
+
|
70
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/warden-cognito.
|
71
|
+
|
72
|
+
## License
|
73
|
+
|
74
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'warden/cognito'
|
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
|
12
|
+
|
13
|
+
require 'irb'
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/docker-compose.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'jwt'
|
2
|
+
require 'warden'
|
3
|
+
require 'dry/configurable'
|
4
|
+
require 'dry/auto_inject'
|
5
|
+
|
6
|
+
require 'active_support'
|
7
|
+
require 'active_support/core_ext'
|
8
|
+
|
9
|
+
module Warden
|
10
|
+
module Cognito
|
11
|
+
extend Dry::Configurable
|
12
|
+
|
13
|
+
setting :user_repository
|
14
|
+
setting :identifying_attribute, 'sub'
|
15
|
+
setting :after_local_user_not_found
|
16
|
+
setting :cache, ActiveSupport::Cache::NullStore.new
|
17
|
+
|
18
|
+
Import = Dry::AutoInject(config)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
require 'warden/cognito/version'
|
23
|
+
require 'warden/cognito/authenticatable_strategy'
|
24
|
+
require 'warden/cognito/token_authenticatable_strategy'
|
25
|
+
require 'warden/cognito/user_helper'
|
26
|
+
require 'warden/cognito/cognito_client'
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'aws-sdk-cognitoidentityprovider'
|
2
|
+
# rubocop:disable Style/SignalException
|
3
|
+
|
4
|
+
module Warden
|
5
|
+
module Cognito
|
6
|
+
class AuthenticatableStrategy < Warden::Strategies::Base
|
7
|
+
attr_reader :helper
|
8
|
+
|
9
|
+
def initialize(env, scope = nil)
|
10
|
+
super
|
11
|
+
@helper = UserHelper
|
12
|
+
end
|
13
|
+
|
14
|
+
def valid?
|
15
|
+
cognito_authenticable?
|
16
|
+
end
|
17
|
+
|
18
|
+
def authenticate!
|
19
|
+
initiate_auth_response = CognitoClient.initiate_auth(email, password)
|
20
|
+
|
21
|
+
return fail(:unknow_cognito_response) unless initiate_auth_response
|
22
|
+
|
23
|
+
user = local_user || after_user_local_not_found(initiate_auth_response.authentication_result)
|
24
|
+
|
25
|
+
fail!(:unknown_user) unless user.present?
|
26
|
+
success!(user)
|
27
|
+
rescue Aws::CognitoIdentityProvider::Errors::NotAuthorizedException
|
28
|
+
fail!(:invalid_login)
|
29
|
+
rescue StandardError
|
30
|
+
fail(:unknow_cognito_response)
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def local_user
|
36
|
+
helper.find_by_cognito_username(email)
|
37
|
+
end
|
38
|
+
|
39
|
+
def after_user_local_not_found(authentication_result)
|
40
|
+
user_response = CognitoClient.fetch(authentication_result.access_token)
|
41
|
+
Cognito.config.after_local_user_not_found&.call(user_response)
|
42
|
+
end
|
43
|
+
|
44
|
+
def cognito_authenticable?
|
45
|
+
params[scope.to_s].present? && password.present?
|
46
|
+
end
|
47
|
+
|
48
|
+
def email
|
49
|
+
auth_params[:email]
|
50
|
+
end
|
51
|
+
|
52
|
+
def password
|
53
|
+
auth_params[:password]
|
54
|
+
end
|
55
|
+
|
56
|
+
def auth_params
|
57
|
+
params[scope.to_s].symbolize_keys.slice(:password, :email)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
# rubocop:enable Style/SignalException
|
63
|
+
|
64
|
+
Warden::Strategies.add(:cognito_auth, Warden::Cognito::AuthenticatableStrategy)
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Warden
|
2
|
+
module Cognito
|
3
|
+
class CognitoClient
|
4
|
+
class << self
|
5
|
+
# https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/CognitoIdentityProvider/Types/GetUserResponse.html
|
6
|
+
def fetch(access_token)
|
7
|
+
client.get_user(access_token: access_token)
|
8
|
+
end
|
9
|
+
|
10
|
+
def initiate_auth(email, password)
|
11
|
+
client.initiate_auth(
|
12
|
+
client_id: ENV['AWS_COGNITO_CLIENT_ID'],
|
13
|
+
auth_flow: 'USER_PASSWORD_AUTH',
|
14
|
+
auth_parameters: {
|
15
|
+
'USERNAME' => email,
|
16
|
+
'PASSWORD' => password
|
17
|
+
}
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def client
|
24
|
+
Aws::CognitoIdentityProvider::Client.new
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
require 'aws-sdk-cognitoidentityprovider'
|
2
|
+
# rubocop:disable Style/SignalException
|
3
|
+
|
4
|
+
module Warden
|
5
|
+
module Cognito
|
6
|
+
class TokenAuthenticatableStrategy < Warden::Strategies::Base
|
7
|
+
METHOD = 'Bearer'.freeze
|
8
|
+
|
9
|
+
attr_reader :helper, :config
|
10
|
+
|
11
|
+
def initialize(env, scope = nil)
|
12
|
+
super
|
13
|
+
@config = Cognito.config
|
14
|
+
@helper = UserHelper
|
15
|
+
end
|
16
|
+
|
17
|
+
def jwks
|
18
|
+
config.cache.fetch(jwk_url, expires_in: 1.hour) do
|
19
|
+
JSON.parse(HTTP.get(jwk_url).body.to_s).deep_symbolize_keys
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def valid?
|
24
|
+
decoded_token.present?
|
25
|
+
rescue ::JWT::ExpiredSignature
|
26
|
+
true
|
27
|
+
rescue StandardError
|
28
|
+
false
|
29
|
+
end
|
30
|
+
|
31
|
+
def authenticate!
|
32
|
+
user = local_user || config.after_local_user_not_found&.call(cognito_user)
|
33
|
+
fail!(:unknown_user) unless user.present?
|
34
|
+
success!(user)
|
35
|
+
rescue ::JWT::ExpiredSignature
|
36
|
+
fail!(:token_expired)
|
37
|
+
rescue StandardError
|
38
|
+
fail(:unknown_error)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def jwt_issuer
|
44
|
+
"https://cognito-idp.#{ENV['AWS_REGION']}.amazonaws.com/#{ENV['AWS_COGNITO_USER_POOL_ID']}"
|
45
|
+
end
|
46
|
+
|
47
|
+
def jwk_url
|
48
|
+
"#{jwt_issuer}/.well-known/jwks.json"
|
49
|
+
end
|
50
|
+
|
51
|
+
def local_user
|
52
|
+
helper.find_by_cognito_attribute(local_identifier)
|
53
|
+
end
|
54
|
+
|
55
|
+
def cognito_user_cache_key
|
56
|
+
"COGNITO_LOCAL_IDENTIFIER_#{cognito_user_identifier}"
|
57
|
+
end
|
58
|
+
|
59
|
+
def cognito_user_identifier
|
60
|
+
decoded_token.first['sub']
|
61
|
+
end
|
62
|
+
|
63
|
+
def local_identifier
|
64
|
+
config.cache.fetch(cognito_user_cache_key, skip_nil: true) do
|
65
|
+
user_attribute identifying_attribute
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def cognito_user
|
70
|
+
@cognito_user ||= CognitoClient.fetch(token)
|
71
|
+
end
|
72
|
+
|
73
|
+
def user_attribute(attribute_name)
|
74
|
+
cognito_user.user_attributes.detect do |attribute|
|
75
|
+
attribute.name == attribute_name
|
76
|
+
end&.value
|
77
|
+
end
|
78
|
+
|
79
|
+
def identifying_attribute
|
80
|
+
config.identifying_attribute.to_s
|
81
|
+
end
|
82
|
+
|
83
|
+
def decoded_token
|
84
|
+
@decoded_token ||= ::JWT.decode(token, nil, true, iss: jwt_issuer, verify_iss: true,
|
85
|
+
algorithms: ['RS256'], jwks: jwks)
|
86
|
+
end
|
87
|
+
|
88
|
+
def token
|
89
|
+
@token ||= extract_token
|
90
|
+
end
|
91
|
+
|
92
|
+
def extract_token
|
93
|
+
return nil unless authorization_header
|
94
|
+
|
95
|
+
method, token = authorization_header.split
|
96
|
+
method == METHOD ? token : nil
|
97
|
+
end
|
98
|
+
|
99
|
+
def authorization_header
|
100
|
+
env['HTTP_AUTHORIZATION']
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
# rubocop:enable Style/SignalException
|
106
|
+
|
107
|
+
Warden::Strategies.add(:cognito_jwt, Warden::Cognito::TokenAuthenticatableStrategy)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Warden
|
2
|
+
module Cognito
|
3
|
+
module UserHelper
|
4
|
+
class << self
|
5
|
+
def find_by_cognito_username(username)
|
6
|
+
user_repository.find_by_cognito_username(username)
|
7
|
+
end
|
8
|
+
|
9
|
+
def find_by_cognito_attribute(arg)
|
10
|
+
user_repository.find_by_cognito_attribute(arg)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def user_repository
|
16
|
+
Cognito.config.user_repository
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require 'warden/cognito/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'warden-cognito'
|
7
|
+
spec.version = Warden::Cognito::VERSION
|
8
|
+
spec.authors = ['Juan F. Pérez']
|
9
|
+
spec.email = ['761794+jguitar@users.noreply.github.com']
|
10
|
+
|
11
|
+
spec.summary = 'Amazon Cognito authentication for Warden'
|
12
|
+
spec.description = '[Unofficial] Authentication Strategy for Warden to allow Amazon Cognito user sign in and JWT'
|
13
|
+
spec.homepage = 'https://github.com/barkibu/warden-cognito'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
if spec.respond_to?(:metadata)
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
18
|
+
spec.metadata['source_code_uri'] = 'https://github.com/barkibu/warden-cognito'
|
19
|
+
spec.metadata['changelog_uri'] = 'https://github.com/barkibu/warden-cognito/blob/master/CHANGELOG.md'
|
20
|
+
else
|
21
|
+
raise 'RubyGems 2.0 or newer is required to protect against ' \
|
22
|
+
'public gem pushes.'
|
23
|
+
end
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
+
end
|
30
|
+
spec.bindir = 'exe'
|
31
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ['lib']
|
33
|
+
spec.required_ruby_version = '>= 2.6'
|
34
|
+
|
35
|
+
spec.add_dependency 'activesupport', '~> 6.0'
|
36
|
+
spec.add_dependency 'aws-sdk-cognitoidentityprovider', '~> 1.47'
|
37
|
+
spec.add_dependency 'dry-auto_inject', '~> 0.6'
|
38
|
+
spec.add_dependency 'dry-configurable', '~> 0.9'
|
39
|
+
spec.add_dependency 'jwt', '~> 2.1'
|
40
|
+
spec.add_dependency 'warden', '~> 1.2'
|
41
|
+
|
42
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
43
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.7'
|
44
|
+
spec.add_development_dependency 'rack-test', '~> 1.1'
|
45
|
+
spec.add_development_dependency 'rake', '>= 12.3.3'
|
46
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
47
|
+
spec.add_development_dependency 'rubocop', '~> 1.2'
|
48
|
+
end
|
metadata
ADDED
@@ -0,0 +1,236 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: warden-cognito
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Juan F. Pérez
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '6.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aws-sdk-cognitoidentityprovider
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.47'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.47'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dry-auto_inject
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.6'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dry-configurable
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jwt
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.1'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: warden
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.2'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.17'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.17'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry-byebug
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.7'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.7'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rack-test
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.1'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 12.3.3
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 12.3.3
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '3.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '3.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '1.2'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '1.2'
|
181
|
+
description: "[Unofficial] Authentication Strategy for Warden to allow Amazon Cognito
|
182
|
+
user sign in and JWT"
|
183
|
+
email:
|
184
|
+
- 761794+jguitar@users.noreply.github.com
|
185
|
+
executables: []
|
186
|
+
extensions: []
|
187
|
+
extra_rdoc_files: []
|
188
|
+
files:
|
189
|
+
- ".gitignore"
|
190
|
+
- ".rspec"
|
191
|
+
- ".rubocop.yml"
|
192
|
+
- ".ruby-version"
|
193
|
+
- ".travis.yml"
|
194
|
+
- CHANGELOG.md
|
195
|
+
- Dockerfile
|
196
|
+
- Gemfile
|
197
|
+
- LICENSE.txt
|
198
|
+
- README.md
|
199
|
+
- Rakefile
|
200
|
+
- bin/console
|
201
|
+
- bin/setup
|
202
|
+
- docker-compose.yml
|
203
|
+
- lib/warden/cognito.rb
|
204
|
+
- lib/warden/cognito/authenticatable_strategy.rb
|
205
|
+
- lib/warden/cognito/cognito_client.rb
|
206
|
+
- lib/warden/cognito/token_authenticatable_strategy.rb
|
207
|
+
- lib/warden/cognito/user_helper.rb
|
208
|
+
- lib/warden/cognito/version.rb
|
209
|
+
- warden-cognito.gemspec
|
210
|
+
homepage: https://github.com/barkibu/warden-cognito
|
211
|
+
licenses:
|
212
|
+
- MIT
|
213
|
+
metadata:
|
214
|
+
homepage_uri: https://github.com/barkibu/warden-cognito
|
215
|
+
source_code_uri: https://github.com/barkibu/warden-cognito
|
216
|
+
changelog_uri: https://github.com/barkibu/warden-cognito/blob/master/CHANGELOG.md
|
217
|
+
post_install_message:
|
218
|
+
rdoc_options: []
|
219
|
+
require_paths:
|
220
|
+
- lib
|
221
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
222
|
+
requirements:
|
223
|
+
- - ">="
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '2.6'
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
231
|
+
requirements: []
|
232
|
+
rubygems_version: 3.0.3
|
233
|
+
signing_key:
|
234
|
+
specification_version: 4
|
235
|
+
summary: Amazon Cognito authentication for Warden
|
236
|
+
test_files: []
|