omniauth-protect 2.0.1 → 3.0.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: 62f6d449313247e99820dc47d5efd787c6a531ffed3c8404402dcc63d8a65efd
4
- data.tar.gz: 9978f183f733c4b3468d7aa5928df926a75ba3f61943998e690545f3222064bd
3
+ metadata.gz: 6847c77ced21cc7918596996ffa4fbed5a66e798c18bb5da4619a29bd2157c97
4
+ data.tar.gz: b61c6b485c50a5c0023ce602be9d1235759e97af45181a3caceb1118ea7491ae
5
5
  SHA512:
6
- metadata.gz: 9c04e802538ac8d826de26ce652040f40ab8667f21b75cee78c6056d7f6150d984bc63dd845a9159acc3463b4947de7493c34ddeff8dff0a42dac20cb2da38d8
7
- data.tar.gz: fae90a7d08bf2ed764676c13db249db1222fcc52923dbbae24f71568878a692e5ff43324c171ab8b22b92664a43c863150c78000d4d830ffe0f89c77ac3ce6af
6
+ metadata.gz: fe072b5bc285d00ec02829bb82a3d4abbde8d35145057f750d47489f7d4184ef761542e0c6d89df053578e812e9f7f4a9b3f1be09b11efa647e318cd7b91f908
7
+ data.tar.gz: 897468e321f3ddd40e50915c93c81bc2cf9caf2c252876160dcf7518bfbcaa057fd809259dd61a2b2c84227ae1b5dfdcc40c3ff4cdc7440c167b1989fc717ef0
@@ -5,9 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
- ## [2.0.1] - 2020-06-29
9
- ### Fixed
10
- - Always cast tokens read from session to a string (cherry picked from 3.0.1)
8
+
9
+ ## [3.0.0] - 2020-06-25
10
+ ### Change
11
+ - Only supports Rails 6+, use 2.0.0 for Rails 5.2.4.3
11
12
 
12
13
  ## [2.0.0] - 2020-06-16
13
14
  ### Changed
data/README.md CHANGED
@@ -20,12 +20,26 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- Add this line to your `config/application.rb`
23
+ Add this line to your `config/application.rb` to use the middleware
24
24
 
25
25
  ```ruby
26
26
  config.middleware.use Omniauth::Protect::Middleware
27
27
  ```
28
28
 
29
+ Or use the validator on it's own
30
+
31
+ ```ruby
32
+ Omniauth::Protect::Validator.new(request.env, encoded_masked_token).valid_csrf_token?
33
+ ```
34
+
35
+ ### Rails versions support
36
+
37
+ `omniauth-protect` `1.0.0` supports `rails < 5.2.4.3` and between `6.0.0` and `6.0.3`
38
+
39
+ `omniauth-protect` `2.0.0` supports `rails = 5.2.4.3`
40
+
41
+ `omniauth-protect` `3.0.0` supports `rails > 6.0.3.1`
42
+
29
43
  ## Configuration
30
44
 
31
45
  You need to create an initiliazer like `config/initializers/omniauth_protect.rb` for configuration
@@ -53,4 +67,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
53
67
 
54
68
  ## Thanks
55
69
 
56
- Speacial thanks to [RainforestQA](https://www.rainforestqa.com/)
70
+ Speacial thanks to [RainforestQA](https://www.rainforestqa.com/)
@@ -17,7 +17,7 @@ module Omniauth
17
17
  return access_denied if env['REQUEST_METHOD'] != 'POST'
18
18
 
19
19
  req = Rack::Request.new(env)
20
- encoded_masked_token = req.params['authenticity_token'].to_s
20
+ encoded_masked_token = req.params['authenticity_token']
21
21
 
22
22
  return access_denied if !encoded_masked_token
23
23
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Protect
5
- VERSION = '2.0.1'
5
+ VERSION = '3.0.0'
6
6
  end
7
7
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_runtime_dependency 'actionpack', '>= 5.2.4.3', '< 6'
26
+ spec.add_runtime_dependency 'actionpack', '>= 6.0.3.1'
27
27
  spec.add_runtime_dependency 'rack'
28
28
 
29
29
  spec.add_development_dependency "bundler", '~> 2'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-protect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serdar Dogruyol
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-29 00:00:00.000000000 Z
11
+ date: 2020-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 5.2.4.3
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '6'
19
+ version: 6.0.3.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.4.3
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '6'
26
+ version: 6.0.3.1
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: rack
35
29
  requirement: !ruby/object:Gem::Requirement