devise_token_auth_headers 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile.lock +36 -51
- data/README.md +6 -3
- data/Rakefile +3 -3
- data/devise_token_auth_headers.gemspec +1 -1
- data/lib/devise_token_auth_headers/header_token_authenticatable.rb +1 -1
- metadata +9 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 86268032c5ddc332f2706f73d356e24aa16ded85
|
4
|
+
data.tar.gz: 0cec3508ef5297db307ec7985df8b79a7b66e46d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 47f79deaa49be220791389cf2b1d14bbf1583082c2f9a3574395b325d0e1b98e226b2d4ad2f1a4aa9bd1955063dd52aa2e2281f015fa0a72ba2cd9b78320f557
|
7
|
+
data.tar.gz: bcba5325d41e69d976ee416935645225452b01b33cb5090fb6c1ff06e116e511f8aa1288a9aff2fcabdcf7876806497621c88c2275b0f343b1fe5c0b09fd2f28
|
data/Gemfile.lock
CHANGED
@@ -1,70 +1,55 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
|
4
|
+
devise_token_auth_headers (1.0.2)
|
5
5
|
devise
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actionpack (
|
11
|
-
|
12
|
-
|
13
|
-
builder (~> 3.0.0)
|
10
|
+
actionpack (4.0.2)
|
11
|
+
activesupport (= 4.0.2)
|
12
|
+
builder (~> 3.1.0)
|
14
13
|
erubis (~> 2.7.0)
|
15
|
-
|
16
|
-
rack (~>
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
builder (3.0.0)
|
28
|
-
devise (2.0.4)
|
14
|
+
rack (~> 1.5.2)
|
15
|
+
rack-test (~> 0.6.2)
|
16
|
+
activesupport (4.0.2)
|
17
|
+
i18n (~> 0.6, >= 0.6.4)
|
18
|
+
minitest (~> 4.2)
|
19
|
+
multi_json (~> 1.3)
|
20
|
+
thread_safe (~> 0.1)
|
21
|
+
tzinfo (~> 0.3.37)
|
22
|
+
atomic (1.1.14)
|
23
|
+
bcrypt-ruby (3.1.2)
|
24
|
+
builder (3.1.4)
|
25
|
+
devise (3.0.0)
|
29
26
|
bcrypt-ruby (~> 3.0)
|
30
|
-
orm_adapter (~> 0.
|
31
|
-
railties (
|
32
|
-
warden (~> 1.
|
27
|
+
orm_adapter (~> 0.1)
|
28
|
+
railties (>= 3.2.6, < 5)
|
29
|
+
warden (~> 1.2.3)
|
33
30
|
erubis (2.7.0)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
rack (1.4.1)
|
41
|
-
rack-cache (1.2)
|
42
|
-
rack (>= 0.4)
|
43
|
-
rack-ssl (1.3.2)
|
44
|
-
rack
|
45
|
-
rack-test (0.6.1)
|
31
|
+
i18n (0.6.9)
|
32
|
+
minitest (4.7.5)
|
33
|
+
multi_json (1.8.2)
|
34
|
+
orm_adapter (0.5.0)
|
35
|
+
rack (1.5.2)
|
36
|
+
rack-test (0.6.2)
|
46
37
|
rack (>= 1.0)
|
47
|
-
railties (
|
48
|
-
actionpack (=
|
49
|
-
activesupport (=
|
50
|
-
rack-ssl (~> 1.3.2)
|
38
|
+
railties (4.0.2)
|
39
|
+
actionpack (= 4.0.2)
|
40
|
+
activesupport (= 4.0.2)
|
51
41
|
rake (>= 0.8.7)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
rack (~> 1.0)
|
60
|
-
tilt (~> 1.1, != 1.3.0)
|
61
|
-
thor (0.14.6)
|
62
|
-
tilt (1.3.3)
|
63
|
-
warden (1.1.1)
|
42
|
+
thor (>= 0.18.1, < 2.0)
|
43
|
+
rake (10.1.0)
|
44
|
+
thor (0.18.1)
|
45
|
+
thread_safe (0.1.3)
|
46
|
+
atomic
|
47
|
+
tzinfo (0.3.38)
|
48
|
+
warden (1.2.3)
|
64
49
|
rack (>= 1.0)
|
65
50
|
|
66
51
|
PLATFORMS
|
67
52
|
ruby
|
68
53
|
|
69
54
|
DEPENDENCIES
|
70
|
-
|
55
|
+
devise_token_auth_headers!
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
devise_token_auth_headers
|
2
2
|
===================
|
3
3
|
|
4
|
-
Patches in support for token authentication via headers in addition to the basic auth or request params for Devise's
|
4
|
+
Patches in support for token authentication via headers in addition to the basic auth or request params for Devise's
|
5
|
+
`token_authenticatable` strategy.
|
5
6
|
|
6
7
|
Based on https://github.com/stvp/devise_header_token - if you need to _replace_ params/basic auth support with headers, so
|
7
8
|
token in parameters or in basic auth will not work, use it.
|
@@ -19,9 +20,11 @@ gem 'devise_token_auth_headers'
|
|
19
20
|
In your `config/initializers/devise.rb`, set the authentication key as usual (or use default).
|
20
21
|
|
21
22
|
Now you can put your token in your headers. Gem generates two keys
|
22
|
-
to check in headers: source key as is was, and X-{source_key.camelize}. Of course it changes '-' to '_'
|
23
|
+
to check in headers: source key as is was, X-{source_key.upcase} and X-{source_key.camelize}. Of course it changes '-' to '_'
|
24
|
+
and uses uppercase.
|
23
25
|
|
24
|
-
For example, if you use deault key @:auth_token@ then the header keys could be either "AUTH_TOKEN"
|
26
|
+
For example, if you use deault key @:auth_token@ then the header keys could be either "AUTH_TOKEN", "X_AUTH_TOKEN"
|
27
|
+
or "X-AuthToken".
|
25
28
|
|
26
29
|
And it all should Just Work™.
|
27
30
|
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ module Devise
|
|
8
8
|
super or begin
|
9
9
|
if !@header_keys
|
10
10
|
base = mapping.to.token_authentication_key.to_s
|
11
|
-
@header_keys = [base, "X_#{base.camelize}"].map { |x| "HTTP_#{x.upcase}" }
|
11
|
+
@header_keys = [base, "X_#{base.camelize}", "X_#{base}"].map { |x| "HTTP_#{x.upcase}" }
|
12
12
|
end
|
13
13
|
self.authentication_hash = {}
|
14
14
|
self.authentication_type = :token_auth
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_token_auth_headers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sergey Chernov
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: devise
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: Patches Devise's token authentication strategy to add header-based token
|
@@ -45,26 +42,25 @@ files:
|
|
45
42
|
- lib/devise_token_auth_headers/header_token_authenticatable.rb
|
46
43
|
homepage: https://github.com/sergeych/devise_token_auth_headers
|
47
44
|
licenses: []
|
45
|
+
metadata: {}
|
48
46
|
post_install_message:
|
49
47
|
rdoc_options: []
|
50
48
|
require_paths:
|
51
49
|
- lib
|
52
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
51
|
requirements:
|
55
|
-
- -
|
52
|
+
- - '>='
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: '0'
|
58
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
56
|
requirements:
|
61
|
-
- -
|
57
|
+
- - '>='
|
62
58
|
- !ruby/object:Gem::Version
|
63
59
|
version: '0'
|
64
60
|
requirements: []
|
65
61
|
rubyforge_project:
|
66
|
-
rubygems_version: 1.
|
62
|
+
rubygems_version: 2.1.11
|
67
63
|
signing_key:
|
68
|
-
specification_version:
|
64
|
+
specification_version: 4
|
69
65
|
summary: Adds header token authentication for Devise :token_authenticable strategy
|
70
66
|
test_files: []
|