knock 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,26 @@
1
1
  Knock.setup do |config|
2
2
 
3
+ ## User handle attribute
4
+ ## ---------------------
5
+ ##
6
+ ## The attribute used to uniquely identify a user.
7
+ ##
8
+ ## Default:
9
+ # config.handle_attr = :email
10
+
11
+ ## Current user retrieval from handle when signing in
12
+ ## --------------------------------------------------
13
+ ##
14
+ ## This is where you can configure how to retrieve the current user when
15
+ ## signing in.
16
+ ##
17
+ ## Knock uses the `handle_attr` variable to retrieve the handle from the
18
+ ## AuthTokenController parameters. It also uses the same variable to enforce
19
+ ## permitted values in the controller.
20
+ ##
21
+ ## Default:
22
+ # self.current_user_from_handle = -> (handle) { User.find_by! Knock.handle_attr => handle }
23
+
3
24
  ## Current user retrieval when validating token
4
25
  ## --------------------------------------------
5
26
  ##
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knock
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud MESUREUR
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-16 00:00:00.000000000 Z
12
+ date: 2015-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '4.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
27
  version: '4.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: jwt
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '1.5'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '1.5'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: bcrypt
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '3.1'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.1'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: sqlite3
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.3'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.3'
70
70
  description: Authentication solution for Rails based on JWT
@@ -123,7 +123,6 @@ files:
123
123
  - test/dummy/db/migrate/20150713101607_create_users.rb
124
124
  - test/dummy/db/schema.rb
125
125
  - test/dummy/db/test.sqlite3
126
- - test/dummy/log/development.log
127
126
  - test/dummy/log/test.log
128
127
  - test/dummy/public/404.html
129
128
  - test/dummy/public/422.html
@@ -147,22 +146,24 @@ require_paths:
147
146
  - lib
148
147
  required_ruby_version: !ruby/object:Gem::Requirement
149
148
  requirements:
150
- - - ">="
149
+ - - ! '>='
151
150
  - !ruby/object:Gem::Version
152
151
  version: '0'
153
152
  required_rubygems_version: !ruby/object:Gem::Requirement
154
153
  requirements:
155
- - - ">="
154
+ - - ! '>='
156
155
  - !ruby/object:Gem::Version
157
156
  version: '0'
158
157
  requirements: []
159
158
  rubyforge_project:
160
- rubygems_version: 2.4.4
159
+ rubygems_version: 2.4.5
161
160
  signing_key:
162
161
  specification_version: 4
163
162
  summary: Seamless JWT authentication for Rails API.
164
163
  test_files:
165
164
  - test/controllers/knock/auth_token_controller_test.rb
165
+ - test/dummy/README.rdoc
166
+ - test/dummy/Rakefile
166
167
  - test/dummy/app/assets/javascripts/application.js
167
168
  - test/dummy/app/assets/stylesheets/application.css
168
169
  - test/dummy/app/controllers/application_controller.rb
@@ -174,6 +175,7 @@ test_files:
174
175
  - test/dummy/bin/rails
175
176
  - test/dummy/bin/rake
176
177
  - test/dummy/bin/setup
178
+ - test/dummy/config.ru
177
179
  - test/dummy/config/application.rb
178
180
  - test/dummy/config/boot.rb
179
181
  - test/dummy/config/database.yml
@@ -192,18 +194,14 @@ test_files:
192
194
  - test/dummy/config/locales/en.yml
193
195
  - test/dummy/config/routes.rb
194
196
  - test/dummy/config/secrets.yml
195
- - test/dummy/config.ru
196
197
  - test/dummy/db/migrate/20150713101607_create_users.rb
197
198
  - test/dummy/db/schema.rb
198
199
  - test/dummy/db/test.sqlite3
199
- - test/dummy/log/development.log
200
200
  - test/dummy/log/test.log
201
201
  - test/dummy/public/404.html
202
202
  - test/dummy/public/422.html
203
203
  - test/dummy/public/500.html
204
204
  - test/dummy/public/favicon.ico
205
- - test/dummy/Rakefile
206
- - test/dummy/README.rdoc
207
205
  - test/dummy/test/controllers/protected_resources_controller_test.rb
208
206
  - test/dummy/test/fixtures/users.yml
209
207
  - test/dummy/test/models/user_test.rb
File without changes