lockie 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/lockie/failure_app.rb +2 -2
- data/lib/lockie/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fbe268cb9149d19e62b0e508449c3c805f735162911db10c1e14469ce4598ea
|
4
|
+
data.tar.gz: 8192dc9af5ca2a778be648bbe364b1ed005a8fd5b13edf966662056acb387877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8820f4ffe9b93814b235eab3faea5f110c2d13d5f339a62e1b22476ceb8cb4c43bd5907f1e1b1e04cab6558e05a01a09f2c233100f25b146bfeb87022286506d
|
7
|
+
data.tar.gz: ab3109f87d1f6204a455c50b38dcf4895e48ca2c205fa2407e839f427e689a7ad1cffdca5cbb074db84bb989713b55f137ef403afab7e17b929b52bd964091d2
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ A drop-in, none assuming warden based Password and JWT authentication for Rails
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem 'lockie', '~> 0.2.
|
12
|
+
gem 'lockie', '~> 0.2.14'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -89,7 +89,8 @@ Lockie.configure do |c|
|
|
89
89
|
# set custom scopes
|
90
90
|
c.scopes = [
|
91
91
|
[:api, { store: false, strategies: [:jwt]}],
|
92
|
-
[:web, { store: true, strategies: [:email_password]}]
|
92
|
+
[:web, { store: true, strategies: [:email_password]}],
|
93
|
+
[:admin, { store: true, strategies: [:email_password], unauthenticated_path: "/login-admin" }]
|
93
94
|
]
|
94
95
|
end
|
95
96
|
```
|
@@ -101,12 +102,12 @@ Using `Warden::Test::Helpers` https://github.com/wardencommunity/warden/wiki/tes
|
|
101
102
|
```
|
102
103
|
include Warden::Test::Helpers
|
103
104
|
|
104
|
-
|
105
|
+
setup do
|
105
106
|
@user = users(:one)
|
106
107
|
login_as @user
|
107
108
|
|
108
109
|
end
|
109
|
-
|
110
|
+
teardown { Warden.test_reset! }
|
110
111
|
```
|
111
112
|
|
112
113
|
### Testing JSON Api with token
|
data/lib/lockie/failure_app.rb
CHANGED
@@ -35,7 +35,7 @@ module Lockie
|
|
35
35
|
self.status = 302
|
36
36
|
if Lockie.config.callback_url
|
37
37
|
callback_url = request.base_url + request.original_fullpath
|
38
|
-
uri = URI(Lockie.config.unauthenticated_path)
|
38
|
+
uri = URI(warden_options[:unauthenticated_path] || Lockie.config.unauthenticated_path)
|
39
39
|
uri.query = (uri.query.to_s.split("&") << "callback_url=#{ callback_url }").join("&")
|
40
40
|
redirect_to uri.to_s
|
41
41
|
else
|
@@ -56,7 +56,7 @@ module Lockie
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def warden
|
59
|
-
env['warden']
|
59
|
+
request.env['warden']
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
data/lib/lockie/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lockie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Melvin Sembrano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -81,19 +81,19 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 3.1.7
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: byebug
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 11.1.3
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 11.1.3
|
97
97
|
description: Drop in password and JWT token authentication for Ruby on Rails
|
98
98
|
email:
|
99
99
|
- melvinsembrano@gmail.com
|