cognito_token_verifier 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/gem-push.yml +41 -0
- data/.github/workflows/ruby-ci.yml +30 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +24 -24
- data/README.md +1 -1
- data/cognito_token_verifier.gemspec +2 -2
- data/gemfiles/rails7.gemfile +11 -0
- data/lib/cognito_token_verifier/version.rb +1 -1
- metadata +12 -20
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8edc16e14b8a1bf1f5a49c693cbb6cb9d5fcc98d8903a65fca45beef5643a7dc
|
4
|
+
data.tar.gz: 68e7af872f597559db0dc2e9839aecb201d0552e54594921c7fc0cbd9dc3fe4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d13e3aa8021496519106c84557211429266d6347503f196dbc13ecacb8475dd4e86ead1f152a4c769a84c626e90f18ec17f19ef99c8cd61f7b61d1be4e73615
|
7
|
+
data.tar.gz: 2675df562c303cd2d111a06f4d025cd9132129316fa7ed07d344fecd9c21f000bec86ee8fd630fcace7343e30d4d7f92c06e87f2129d25a14a13c1dd9bc1c74a
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
2
|
+
# to commit it to your repository.
|
3
|
+
#
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
5
|
+
# or to provide custom queries or build logic.
|
6
|
+
#
|
7
|
+
# ******** NOTE ********
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
10
|
+
# supported CodeQL languages.
|
11
|
+
#
|
12
|
+
name: "CodeQL"
|
13
|
+
|
14
|
+
on:
|
15
|
+
push:
|
16
|
+
branches: [ master ]
|
17
|
+
pull_request:
|
18
|
+
# The branches below must be a subset of the branches above
|
19
|
+
branches: [ master ]
|
20
|
+
schedule:
|
21
|
+
- cron: '35 20 * * 6'
|
22
|
+
|
23
|
+
jobs:
|
24
|
+
analyze:
|
25
|
+
name: Analyze
|
26
|
+
runs-on: ubuntu-latest
|
27
|
+
permissions:
|
28
|
+
actions: read
|
29
|
+
contents: read
|
30
|
+
security-events: write
|
31
|
+
|
32
|
+
strategy:
|
33
|
+
fail-fast: false
|
34
|
+
matrix:
|
35
|
+
language: [ 'ruby' ]
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
37
|
+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
38
|
+
|
39
|
+
steps:
|
40
|
+
- name: Checkout repository
|
41
|
+
uses: actions/checkout@v2
|
42
|
+
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
44
|
+
- name: Initialize CodeQL
|
45
|
+
uses: github/codeql-action/init@v1
|
46
|
+
with:
|
47
|
+
languages: ${{ matrix.language }}
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
51
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
52
|
+
|
53
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
54
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
55
|
+
- name: Autobuild
|
56
|
+
uses: github/codeql-action/autobuild@v1
|
57
|
+
|
58
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
59
|
+
# 📚 https://git.io/JvXDl
|
60
|
+
|
61
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
62
|
+
# and modify them (or add more) to build your code if your project
|
63
|
+
# uses a compiled language
|
64
|
+
|
65
|
+
#- run: |
|
66
|
+
# make bootstrap
|
67
|
+
# make release
|
68
|
+
|
69
|
+
- name: Perform CodeQL Analysis
|
70
|
+
uses: github/codeql-action/analyze@v1
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- v*
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby 2.7
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: 2.7
|
19
|
+
|
20
|
+
- name: Publish to GPR
|
21
|
+
run: |
|
22
|
+
mkdir -p $HOME/.gem
|
23
|
+
touch $HOME/.gem/credentials
|
24
|
+
chmod 0600 $HOME/.gem/credentials
|
25
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
26
|
+
gem build *.gemspec
|
27
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
28
|
+
env:
|
29
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
30
|
+
OWNER: ${{ github.repository_owner }}
|
31
|
+
|
32
|
+
- name: Publish to RubyGems
|
33
|
+
run: |
|
34
|
+
mkdir -p $HOME/.gem
|
35
|
+
touch $HOME/.gem/credentials
|
36
|
+
chmod 0600 $HOME/.gem/credentials
|
37
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
38
|
+
gem build *.gemspec
|
39
|
+
gem push *.gem
|
40
|
+
env:
|
41
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Ruby CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
name: "Ruby ${{ matrix.ruby }}, Gemfile ${{ matrix.gemfile }}"
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
fail-fast: true
|
16
|
+
matrix:
|
17
|
+
ruby: ['3.1', '3.0', '2.7']
|
18
|
+
gemfile: ['rails52', 'rails6', 'rails61', 'rails7']
|
19
|
+
|
20
|
+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
|
21
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
|
22
|
+
steps:
|
23
|
+
- uses: actions/checkout@v2
|
24
|
+
- name: Set up Ruby ${{ matrix.ruby }}
|
25
|
+
uses: ruby/setup-ruby@359bebbc29cbe6c87da6bc9ea3bc930432750108
|
26
|
+
with:
|
27
|
+
ruby-version: ${{ matrix.ruby }}
|
28
|
+
bundler-cache: true
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rspec
|
data/.tool-versions
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby 3.1.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,37 +2,37 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
cognito_token_verifier (0.5.0)
|
5
|
-
activesupport (>= 5.2
|
5
|
+
activesupport (>= 5.2)
|
6
6
|
json-jwt (~> 1.11)
|
7
7
|
rest-client (~> 2.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionpack (6.1.
|
13
|
-
actionview (= 6.1.
|
14
|
-
activesupport (= 6.1.
|
12
|
+
actionpack (6.1.4.6)
|
13
|
+
actionview (= 6.1.4.6)
|
14
|
+
activesupport (= 6.1.4.6)
|
15
15
|
rack (~> 2.0, >= 2.0.9)
|
16
16
|
rack-test (>= 0.6.3)
|
17
17
|
rails-dom-testing (~> 2.0)
|
18
18
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
19
|
-
actionview (6.1.
|
20
|
-
activesupport (= 6.1.
|
19
|
+
actionview (6.1.4.6)
|
20
|
+
activesupport (= 6.1.4.6)
|
21
21
|
builder (~> 3.1)
|
22
22
|
erubi (~> 1.4)
|
23
23
|
rails-dom-testing (~> 2.0)
|
24
24
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
25
|
-
activesupport (6.1.
|
25
|
+
activesupport (6.1.4.6)
|
26
26
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
27
27
|
i18n (>= 1.6, < 2)
|
28
28
|
minitest (>= 5.1)
|
29
29
|
tzinfo (~> 2.0)
|
30
30
|
zeitwerk (~> 2.3)
|
31
31
|
aes_key_wrap (1.1.0)
|
32
|
-
bindata (2.4.
|
32
|
+
bindata (2.4.10)
|
33
33
|
builder (3.2.4)
|
34
34
|
byebug (11.1.3)
|
35
|
-
concurrent-ruby (1.1.
|
35
|
+
concurrent-ruby (1.1.9)
|
36
36
|
crass (1.0.6)
|
37
37
|
diff-lcs (1.4.4)
|
38
38
|
domain_name (0.5.20190701)
|
@@ -41,39 +41,39 @@ GEM
|
|
41
41
|
http-accept (1.7.0)
|
42
42
|
http-cookie (1.0.3)
|
43
43
|
domain_name (~> 0.5)
|
44
|
-
i18n (1.
|
44
|
+
i18n (1.9.1)
|
45
45
|
concurrent-ruby (~> 1.0)
|
46
46
|
json-jwt (1.13.0)
|
47
47
|
activesupport (>= 4.2)
|
48
48
|
aes_key_wrap
|
49
49
|
bindata
|
50
|
-
loofah (2.
|
50
|
+
loofah (2.14.0)
|
51
51
|
crass (~> 1.0.2)
|
52
52
|
nokogiri (>= 1.5.9)
|
53
53
|
method_source (1.0.0)
|
54
54
|
mime-types (3.3.1)
|
55
55
|
mime-types-data (~> 3.2015)
|
56
56
|
mime-types-data (3.2020.0512)
|
57
|
-
mini_portile2 (2.
|
58
|
-
minitest (5.
|
57
|
+
mini_portile2 (2.7.1)
|
58
|
+
minitest (5.15.0)
|
59
59
|
netrc (0.11.0)
|
60
|
-
nokogiri (1.
|
61
|
-
mini_portile2 (~> 2.
|
60
|
+
nokogiri (1.13.1)
|
61
|
+
mini_portile2 (~> 2.7.0)
|
62
62
|
racc (~> 1.4)
|
63
|
-
racc (1.
|
63
|
+
racc (1.6.0)
|
64
64
|
rack (2.2.3)
|
65
65
|
rack-test (1.1.0)
|
66
66
|
rack (>= 1.0, < 3)
|
67
67
|
rails-dom-testing (2.0.3)
|
68
68
|
activesupport (>= 4.2.0)
|
69
69
|
nokogiri (>= 1.6)
|
70
|
-
rails-html-sanitizer (1.
|
70
|
+
rails-html-sanitizer (1.4.2)
|
71
71
|
loofah (~> 2.3)
|
72
|
-
railties (6.1.
|
73
|
-
actionpack (= 6.1.
|
74
|
-
activesupport (= 6.1.
|
72
|
+
railties (6.1.4.6)
|
73
|
+
actionpack (= 6.1.4.6)
|
74
|
+
activesupport (= 6.1.4.6)
|
75
75
|
method_source
|
76
|
-
rake (>= 0.
|
76
|
+
rake (>= 0.13)
|
77
77
|
thor (~> 1.0)
|
78
78
|
rake (13.0.3)
|
79
79
|
rest-client (2.1.0)
|
@@ -98,19 +98,19 @@ GEM
|
|
98
98
|
rspec-mocks (~> 3.9.0)
|
99
99
|
rspec-support (~> 3.9.0)
|
100
100
|
rspec-support (3.9.3)
|
101
|
-
thor (1.1
|
101
|
+
thor (1.2.1)
|
102
102
|
tzinfo (2.0.4)
|
103
103
|
concurrent-ruby (~> 1.0)
|
104
104
|
unf (0.1.4)
|
105
105
|
unf_ext
|
106
106
|
unf_ext (0.0.7.7)
|
107
|
-
zeitwerk (2.4
|
107
|
+
zeitwerk (2.5.4)
|
108
108
|
|
109
109
|
PLATFORMS
|
110
110
|
ruby
|
111
111
|
|
112
112
|
DEPENDENCIES
|
113
|
-
actionpack (>= 5.2
|
113
|
+
actionpack (>= 5.2)
|
114
114
|
bundler (~> 2.0)
|
115
115
|
byebug (~> 11.0)
|
116
116
|
cognito_token_verifier!
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# CognitoTokenVerifier
|
1
|
+
# CognitoTokenVerifier ![Build Status](https://github.com/CodingAnarchy/cognito_token_verifier/actions/workflows/ruby-ci.yml/badge.svg)
|
2
2
|
|
3
3
|
Verify and decode AWS Cognito tokens for use in your Rails 5.2+ application. Rails versions <= 5.2 are incompatible with the required gemspec as of 0.4+, as they are no longer supported for security fixes by the Rails team.
|
4
4
|
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ["lib"]
|
33
33
|
|
34
|
-
spec.add_runtime_dependency "activesupport", [">= 5.2"
|
34
|
+
spec.add_runtime_dependency "activesupport", [">= 5.2"]
|
35
35
|
spec.add_runtime_dependency "json-jwt", "~> 1.11"
|
36
36
|
spec.add_runtime_dependency "rest-client", "~> 2.0"
|
37
37
|
|
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "bundler", "~> 2.0"
|
40
40
|
spec.add_development_dependency "rake", [">= 10.0", "< 14.0"]
|
41
41
|
spec.add_development_dependency "rspec-rails", "~> 3.0"
|
42
|
-
spec.add_development_dependency "actionpack", [">= 5.2"
|
42
|
+
spec.add_development_dependency "actionpack", [">= 5.2"]
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cognito_token_verifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Tanous
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -17,9 +17,6 @@ dependencies:
|
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '5.2'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,9 +24,6 @@ dependencies:
|
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '5.2'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: json-jwt
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,9 +121,6 @@ dependencies:
|
|
127
121
|
- - ">="
|
128
122
|
- !ruby/object:Gem::Version
|
129
123
|
version: '5.2'
|
130
|
-
- - "<"
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
version: '6.2'
|
133
124
|
type: :development
|
134
125
|
prerelease: false
|
135
126
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -137,19 +128,19 @@ dependencies:
|
|
137
128
|
- - ">="
|
138
129
|
- !ruby/object:Gem::Version
|
139
130
|
version: '5.2'
|
140
|
-
|
141
|
-
- !ruby/object:Gem::Version
|
142
|
-
version: '6.2'
|
143
|
-
description:
|
131
|
+
description:
|
144
132
|
email:
|
145
133
|
- mtanous22@gmail.com
|
146
134
|
executables: []
|
147
135
|
extensions: []
|
148
136
|
extra_rdoc_files: []
|
149
137
|
files:
|
138
|
+
- ".github/workflows/codeql-analysis.yml"
|
139
|
+
- ".github/workflows/gem-push.yml"
|
140
|
+
- ".github/workflows/ruby-ci.yml"
|
150
141
|
- ".gitignore"
|
151
142
|
- ".rspec"
|
152
|
-
- ".
|
143
|
+
- ".tool-versions"
|
153
144
|
- CHANGELOG.md
|
154
145
|
- Gemfile
|
155
146
|
- Gemfile.lock
|
@@ -162,6 +153,7 @@ files:
|
|
162
153
|
- gemfiles/rails52.gemfile
|
163
154
|
- gemfiles/rails6.gemfile
|
164
155
|
- gemfiles/rails61.gemfile
|
156
|
+
- gemfiles/rails7.gemfile
|
165
157
|
- lib/cognito_token_verifier.rb
|
166
158
|
- lib/cognito_token_verifier/config.rb
|
167
159
|
- lib/cognito_token_verifier/controller_macros.rb
|
@@ -175,7 +167,7 @@ metadata:
|
|
175
167
|
homepage_uri: https://github.com/CodingAnarchy/cognito_token_verifier
|
176
168
|
source_code_uri: https://github.com/CodingAnarchy/cognito_token_verifier
|
177
169
|
changelog_uri: https://github.com/CodingAnarchy/cognito_token_verifier/blob/master/CHANGELOG.md
|
178
|
-
post_install_message:
|
170
|
+
post_install_message:
|
179
171
|
rdoc_options: []
|
180
172
|
require_paths:
|
181
173
|
- lib
|
@@ -190,8 +182,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
182
|
- !ruby/object:Gem::Version
|
191
183
|
version: '0'
|
192
184
|
requirements: []
|
193
|
-
rubygems_version: 3.
|
194
|
-
signing_key:
|
185
|
+
rubygems_version: 3.1.6
|
186
|
+
signing_key:
|
195
187
|
specification_version: 4
|
196
188
|
summary: Verify and parse AWS Cognito JWTs to authenticate endpoints
|
197
189
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sudo: false
|
3
|
-
language: ruby
|
4
|
-
cache: bundler
|
5
|
-
rvm:
|
6
|
-
- 2.6.6
|
7
|
-
- 2.7.2
|
8
|
-
- 3.0.0
|
9
|
-
before_install: gem install bundler
|
10
|
-
gemfile:
|
11
|
-
- Gemfile
|
12
|
-
- gemfiles/rails52.gemfile
|
13
|
-
- gemfiles/rails6.gemfile
|
14
|
-
- gemfiles/rails61.gemfile
|
15
|
-
|
16
|
-
# jobs:
|
17
|
-
# exclude:
|