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 +4 -4
- data/CHANGELOG.md +4 -3
- data/README.md +16 -2
- data/lib/omniauth/protect/middleware.rb +1 -1
- data/lib/omniauth/protect/version.rb +1 -1
- data/omniauth-protect.gemspec +1 -1
- metadata +4 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6847c77ced21cc7918596996ffa4fbed5a66e798c18bb5da4619a29bd2157c97
|
4
|
+
data.tar.gz: b61c6b485c50a5c0023ce602be9d1235759e97af45181a3caceb1118ea7491ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe072b5bc285d00ec02829bb82a3d4abbde8d35145057f750d47489f7d4184ef761542e0c6d89df053578e812e9f7f4a9b3f1be09b11efa647e318cd7b91f908
|
7
|
+
data.tar.gz: 897468e321f3ddd40e50915c93c81bc2cf9caf2c252876160dcf7518bfbcaa057fd809259dd61a2b2c84227ae1b5dfdcc40c3ff4cdc7440c167b1989fc717ef0
|
data/CHANGELOG.md
CHANGED
@@ -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
|
-
|
9
|
-
|
10
|
-
|
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']
|
20
|
+
encoded_masked_token = req.params['authenticity_token']
|
21
21
|
|
22
22
|
return access_denied if !encoded_masked_token
|
23
23
|
|
data/omniauth-protect.gemspec
CHANGED
@@ -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', '>=
|
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:
|
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-
|
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:
|
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:
|
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
|