grape_simple_auth 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grape_simple_auth/oauth2.rb +7 -1
- data/lib/grape_simple_auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 514832426298a7161edf6a2ee9eecc2744da6c345f5f5abb0a0c2f2bc0f7849d
|
4
|
+
data.tar.gz: 925214598e994294a61ef684a08b9b385d8e6d1ae437128b658f89621a87de5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3300fdfa4bfbfdfd7f82449ca3ebb7584392d707bb4752b885c20f337afdc7860a159dfabaf11b23afd0cfe5a67f62cece011cf91455fa91df49ce74745ca38c
|
7
|
+
data.tar.gz: 7bb618d60232690f1923744dccb5bdaf4603ca8c5038f7fe2f6135906bb9410f93e9ee0e361d596d291f763e42f2c07821b60e8e27509e8d0ffdaaf362693dd4
|
@@ -18,7 +18,13 @@ module GrapeSimpleAuth
|
|
18
18
|
|
19
19
|
def token
|
20
20
|
token = if request.headers["Authorization"].present?
|
21
|
-
request.headers["Authorization"].include?("bearer")
|
21
|
+
if request.headers["Authorization"].include?("bearer")
|
22
|
+
request.headers["Authorization"].try("split", "bearer").try(:last).try(:strip)
|
23
|
+
elsif request.headers["Authorization"].include?("Bearer")
|
24
|
+
request.headers["Authorization"].try("split", "Bearer").try(:last).try(:strip)
|
25
|
+
else
|
26
|
+
request.headers["Authorization"]
|
27
|
+
end
|
22
28
|
else
|
23
29
|
request.parameters["access_token"]
|
24
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape_simple_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yunan Helmy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|