cognito_token_verifier 0.5.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1cdcaef0b4d5ca7837dfedbaae4205e218675defa5318cbb9f99d9ed8eced3e
4
- data.tar.gz: 195886dac29323c2f739333807ca256cc86576963bf8cfd0ff87d7ab7d858518
3
+ metadata.gz: 834f890adf4f2ff175abe5e980144d499e6e7f9d758ddf4fb3c1ad6c61195944
4
+ data.tar.gz: 78107cc16b7ac3ef2c2bbd4aa591eafd98a1287214a5890d6ce1e22363393c86
5
5
  SHA512:
6
- metadata.gz: 8cd7ad61ad6e589a7d440a0ef2f395a6fded8f5c7d6656954231b851930dd332bb4aae2fad43a6affecda83c9374b469877678f10463520e79cb7de9905c4bfa
7
- data.tar.gz: 5be66162f09998b41dc691cfbaf12af71a597cedfc91925c8d3def18c3bba92b09d62fe48ce8807d667a14c685f3aedec88aaad6c22ddd128f5840e19496544e
6
+ metadata.gz: b89b280f553aae1528751b4fd77158ad4d772616f53b5cf93750ba16c1747ee1b35b9e3e601d95000a1d59a2793e6f4bf1208b9872eb6f3caff809520b9d8b14
7
+ data.tar.gz: f27fff2a4f6a8d14e6fa71f5822370809f5321cb0fff5382e4ae0ea4838fa51dfb3f802c9d3b8c3da8821d71b63d1b6bc602d750707a414b6752b07959233140
@@ -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 3.1
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 3.1
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.3', '3.2', '3.1']
18
+ gemfile: ['rails61', 'rails7', 'rails71']
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@v1
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.3.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.7.0 (2024-02-28)
4
+
5
+ - Add Rails 7.1 support
6
+ - Test against Ruby 3.2 and 3.3
7
+ - Remove official support for Rails 5.2
8
+ - Remove official support for Rails 6.0
9
+ - Remove testing for Ruby 2.7 & 3.0
10
+
11
+ ## 0.6.0 (2022-02-24)
12
+
13
+ - Add Rails 7 support
14
+ - Test against Ruby 3.1
15
+
3
16
  ## 0.5.0 (2021-01-27)
4
17
 
5
18
  - Update `nokogiri` version to 1.11 for security patch in gem development
data/Gemfile.lock CHANGED
@@ -1,89 +1,130 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cognito_token_verifier (0.5.0)
5
- activesupport (>= 5.2, < 6.2)
4
+ cognito_token_verifier (0.7.0)
5
+ activesupport (>= 6.1)
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.1)
13
- actionview (= 6.1.1)
14
- activesupport (= 6.1.1)
15
- rack (~> 2.0, >= 2.0.9)
12
+ actionpack (7.1.3.2)
13
+ actionview (= 7.1.3.2)
14
+ activesupport (= 7.1.3.2)
15
+ nokogiri (>= 1.8.5)
16
+ racc
17
+ rack (>= 2.2.4)
18
+ rack-session (>= 1.0.1)
16
19
  rack-test (>= 0.6.3)
17
- rails-dom-testing (~> 2.0)
18
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.1.1)
20
- activesupport (= 6.1.1)
20
+ rails-dom-testing (~> 2.2)
21
+ rails-html-sanitizer (~> 1.6)
22
+ actionview (7.1.3.2)
23
+ activesupport (= 7.1.3.2)
21
24
  builder (~> 3.1)
22
- erubi (~> 1.4)
23
- rails-dom-testing (~> 2.0)
24
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activesupport (6.1.1)
25
+ erubi (~> 1.11)
26
+ rails-dom-testing (~> 2.2)
27
+ rails-html-sanitizer (~> 1.6)
28
+ activesupport (7.1.3.2)
29
+ base64
30
+ bigdecimal
26
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ connection_pool (>= 2.2.5)
33
+ drb
27
34
  i18n (>= 1.6, < 2)
28
35
  minitest (>= 5.1)
36
+ mutex_m
29
37
  tzinfo (~> 2.0)
30
- zeitwerk (~> 2.3)
31
38
  aes_key_wrap (1.1.0)
32
- bindata (2.4.8)
39
+ base64 (0.2.0)
40
+ bigdecimal (3.1.6)
41
+ bindata (2.5.0)
33
42
  builder (3.2.4)
34
43
  byebug (11.1.3)
35
- concurrent-ruby (1.1.8)
44
+ concurrent-ruby (1.2.3)
45
+ connection_pool (2.4.1)
36
46
  crass (1.0.6)
37
- diff-lcs (1.4.4)
38
- domain_name (0.5.20190701)
39
- unf (>= 0.0.5, < 1.0.0)
40
- erubi (1.10.0)
47
+ diff-lcs (1.5.1)
48
+ domain_name (0.6.20240107)
49
+ drb (2.2.0)
50
+ ruby2_keywords
51
+ erubi (1.12.0)
52
+ faraday (2.9.0)
53
+ faraday-net_http (>= 2.0, < 3.2)
54
+ faraday-follow_redirects (0.3.0)
55
+ faraday (>= 1, < 3)
56
+ faraday-net_http (3.1.0)
57
+ net-http
41
58
  http-accept (1.7.0)
42
- http-cookie (1.0.3)
59
+ http-cookie (1.0.5)
43
60
  domain_name (~> 0.5)
44
- i18n (1.8.7)
61
+ i18n (1.14.1)
45
62
  concurrent-ruby (~> 1.0)
46
- json-jwt (1.13.0)
63
+ io-console (0.7.2)
64
+ irb (1.11.2)
65
+ rdoc
66
+ reline (>= 0.4.2)
67
+ json-jwt (1.16.5)
47
68
  activesupport (>= 4.2)
48
69
  aes_key_wrap
70
+ base64
49
71
  bindata
50
- loofah (2.9.0)
72
+ faraday (~> 2.0)
73
+ faraday-follow_redirects
74
+ loofah (2.22.0)
51
75
  crass (~> 1.0.2)
52
- nokogiri (>= 1.5.9)
53
- method_source (1.0.0)
54
- mime-types (3.3.1)
76
+ nokogiri (>= 1.12.0)
77
+ mime-types (3.5.2)
55
78
  mime-types-data (~> 3.2015)
56
- mime-types-data (3.2020.0512)
57
- mini_portile2 (2.5.0)
58
- minitest (5.14.3)
79
+ mime-types-data (3.2024.0206)
80
+ mini_portile2 (2.8.5)
81
+ minitest (5.22.2)
82
+ mutex_m (0.2.0)
83
+ net-http (0.4.1)
84
+ uri
59
85
  netrc (0.11.0)
60
- nokogiri (1.11.1)
61
- mini_portile2 (~> 2.5.0)
86
+ nokogiri (1.16.2)
87
+ mini_portile2 (~> 2.8.2)
62
88
  racc (~> 1.4)
63
- racc (1.5.2)
64
- rack (2.2.3)
65
- rack-test (1.1.0)
66
- rack (>= 1.0, < 3)
67
- rails-dom-testing (2.0.3)
68
- activesupport (>= 4.2.0)
89
+ psych (5.1.2)
90
+ stringio
91
+ racc (1.7.3)
92
+ rack (3.0.9.1)
93
+ rack-session (2.0.0)
94
+ rack (>= 3.0.0)
95
+ rack-test (2.1.0)
96
+ rack (>= 1.3)
97
+ rackup (2.1.0)
98
+ rack (>= 3)
99
+ webrick (~> 1.8)
100
+ rails-dom-testing (2.2.0)
101
+ activesupport (>= 5.0.0)
102
+ minitest
69
103
  nokogiri (>= 1.6)
70
- rails-html-sanitizer (1.3.0)
71
- loofah (~> 2.3)
72
- railties (6.1.1)
73
- actionpack (= 6.1.1)
74
- activesupport (= 6.1.1)
75
- method_source
76
- rake (>= 0.8.7)
77
- thor (~> 1.0)
78
- rake (13.0.3)
104
+ rails-html-sanitizer (1.6.0)
105
+ loofah (~> 2.21)
106
+ nokogiri (~> 1.14)
107
+ railties (7.1.3.2)
108
+ actionpack (= 7.1.3.2)
109
+ activesupport (= 7.1.3.2)
110
+ irb
111
+ rackup (>= 1.0.0)
112
+ rake (>= 12.2)
113
+ thor (~> 1.0, >= 1.2.2)
114
+ zeitwerk (~> 2.6)
115
+ rake (13.1.0)
116
+ rdoc (6.6.2)
117
+ psych (>= 4.0.0)
118
+ reline (0.4.3)
119
+ io-console (~> 0.5)
79
120
  rest-client (2.1.0)
80
121
  http-accept (>= 1.7.0, < 2.0)
81
122
  http-cookie (>= 1.0.2, < 2.0)
82
123
  mime-types (>= 1.16, < 4.0)
83
124
  netrc (~> 0.8)
84
- rspec-core (3.9.2)
125
+ rspec-core (3.9.3)
85
126
  rspec-support (~> 3.9.3)
86
- rspec-expectations (3.9.2)
127
+ rspec-expectations (3.9.4)
87
128
  diff-lcs (>= 1.2.0, < 2.0)
88
129
  rspec-support (~> 3.9.0)
89
130
  rspec-mocks (3.9.1)
@@ -97,20 +138,21 @@ GEM
97
138
  rspec-expectations (~> 3.9.0)
98
139
  rspec-mocks (~> 3.9.0)
99
140
  rspec-support (~> 3.9.0)
100
- rspec-support (3.9.3)
101
- thor (1.1.0)
102
- tzinfo (2.0.4)
141
+ rspec-support (3.9.4)
142
+ ruby2_keywords (0.0.5)
143
+ stringio (3.1.0)
144
+ thor (1.3.1)
145
+ tzinfo (2.0.6)
103
146
  concurrent-ruby (~> 1.0)
104
- unf (0.1.4)
105
- unf_ext
106
- unf_ext (0.0.7.7)
107
- zeitwerk (2.4.2)
147
+ uri (0.13.0)
148
+ webrick (1.8.1)
149
+ zeitwerk (2.6.13)
108
150
 
109
151
  PLATFORMS
110
152
  ruby
111
153
 
112
154
  DEPENDENCIES
113
- actionpack (>= 5.2, < 6.2)
155
+ actionpack (>= 6.1)
114
156
  bundler (~> 2.0)
115
157
  byebug (~> 11.0)
116
158
  cognito_token_verifier!
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # CognitoTokenVerifier [![Build Status](https://travis-ci.com/CodingAnarchy/cognito_token_verifier.svg?branch=master)](https://travis-ci.com/CodingAnarchy/cognito_token_verifier)
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", "< 6.2"]
34
+ spec.add_runtime_dependency "activesupport", [">= 6.1"]
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", "< 6.2"]
42
+ spec.add_development_dependency "actionpack", [">= 6.1"]
43
43
  end
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "activesupport", "~> 5.2.0"
3
+ gem "activesupport", "~> 7.0.0"
4
4
  gem "json-jwt", "~> 1.11"
5
5
  gem "rest-client", "~> 2.0"
6
6
 
@@ -8,4 +8,4 @@ gem "byebug"
8
8
  gem "bundler", "~> 2.0"
9
9
  gem "rake", "~> 12.0"
10
10
  gem "rspec-rails", "~> 3.0"
11
- gem "actionpack", "~> 5.2.0"
11
+ gem "actionpack", "~> 7.0.0"
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "activesupport", "~> 6.0.0"
3
+ gem "activesupport", "~> 7.1.0"
4
4
  gem "json-jwt", "~> 1.11"
5
5
  gem "rest-client", "~> 2.0"
6
6
 
@@ -8,4 +8,4 @@ gem "byebug"
8
8
  gem "bundler", "~> 2.0"
9
9
  gem "rake", "~> 12.0"
10
10
  gem "rspec-rails", "~> 3.0"
11
- gem "actionpack", "~> 6.0.0"
11
+ gem "actionpack", "~> 7.1.0"
@@ -1,3 +1,3 @@
1
1
  module CognitoTokenVerifier
2
- VERSION = "0.5.0"
2
+ VERSION = "0.7.0"
3
3
  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.5.0
4
+ version: 0.7.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: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6.2'
19
+ version: '6.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '5.2'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6.2'
26
+ version: '6.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: json-jwt
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -126,30 +120,27 @@ dependencies:
126
120
  requirements:
127
121
  - - ">="
128
122
  - !ruby/object:Gem::Version
129
- version: '5.2'
130
- - - "<"
131
- - !ruby/object:Gem::Version
132
- version: '6.2'
123
+ version: '6.1'
133
124
  type: :development
134
125
  prerelease: false
135
126
  version_requirements: !ruby/object:Gem::Requirement
136
127
  requirements:
137
128
  - - ">="
138
129
  - !ruby/object:Gem::Version
139
- version: '5.2'
140
- - - "<"
141
- - !ruby/object:Gem::Version
142
- version: '6.2'
143
- description:
130
+ version: '6.1'
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
- - ".travis.yml"
143
+ - ".tool-versions"
153
144
  - CHANGELOG.md
154
145
  - Gemfile
155
146
  - Gemfile.lock
@@ -159,9 +150,9 @@ files:
159
150
  - bin/console
160
151
  - bin/setup
161
152
  - cognito_token_verifier.gemspec
162
- - gemfiles/rails52.gemfile
163
- - gemfiles/rails6.gemfile
164
153
  - gemfiles/rails61.gemfile
154
+ - gemfiles/rails7.gemfile
155
+ - gemfiles/rails71.gemfile
165
156
  - lib/cognito_token_verifier.rb
166
157
  - lib/cognito_token_verifier/config.rb
167
158
  - lib/cognito_token_verifier/controller_macros.rb
@@ -175,7 +166,7 @@ metadata:
175
166
  homepage_uri: https://github.com/CodingAnarchy/cognito_token_verifier
176
167
  source_code_uri: https://github.com/CodingAnarchy/cognito_token_verifier
177
168
  changelog_uri: https://github.com/CodingAnarchy/cognito_token_verifier/blob/master/CHANGELOG.md
178
- post_install_message:
169
+ post_install_message:
179
170
  rdoc_options: []
180
171
  require_paths:
181
172
  - lib
@@ -190,8 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
181
  - !ruby/object:Gem::Version
191
182
  version: '0'
192
183
  requirements: []
193
- rubygems_version: 3.0.3
194
- signing_key:
184
+ rubygems_version: 3.3.26
185
+ signing_key:
195
186
  specification_version: 4
196
187
  summary: Verify and parse AWS Cognito JWTs to authenticate endpoints
197
188
  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: