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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d202a04abf27c03afdd6a0de047d4f40789aeaa9ac42927762fa2ad83029d491
4
- data.tar.gz: ff63303453740b70b984b8adab5cf0bcf987e1bc9ee839d9baae25e665f635c0
3
+ metadata.gz: 2fbe268cb9149d19e62b0e508449c3c805f735162911db10c1e14469ce4598ea
4
+ data.tar.gz: 8192dc9af5ca2a778be648bbe364b1ed005a8fd5b13edf966662056acb387877
5
5
  SHA512:
6
- metadata.gz: 681a8fe65fc80668b554ea412a7278d86207db37278e044832b056003ff3cb7ab17ddcb073481d3c23c9efd4d3c30fc9ce469d602cc337eee8c167ea7d6d62ab
7
- data.tar.gz: 195ae8d4d102b15017c6c56a343a69799361a8b643da26c48be9f587fd72fdb6415c0bad4851f1904c3e3595d9e915f2a0ca2131c93ef1e33fe5ef94b3aaa879
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.11'
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
- before do
105
+ setup do
105
106
  @user = users(:one)
106
107
  login_as @user
107
108
 
108
109
  end
109
- after { Warden.test_reset! }
110
+ teardown { Warden.test_reset! }
110
111
  ```
111
112
 
112
113
  ### Testing JSON Api with token
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Lockie
2
- VERSION = '0.2.13'
2
+ VERSION = '0.2.14'
3
3
  end
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.13
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-03-06 00:00:00.000000000 Z
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: pry
84
+ name: byebug
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0.12'
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: '0.12'
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