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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f47da796f0828ec0357808048ef324c1a84ffc6f57a19443e2e6f475a433592f
4
- data.tar.gz: a8b89fe30828854bbcbc7b69c2b0521f1f7049ae5e0e4e1cc5db56863f3b53df
3
+ metadata.gz: 514832426298a7161edf6a2ee9eecc2744da6c345f5f5abb0a0c2f2bc0f7849d
4
+ data.tar.gz: 925214598e994294a61ef684a08b9b385d8e6d1ae437128b658f89621a87de5d
5
5
  SHA512:
6
- metadata.gz: dbbe3ada101559255920abd3fb2407fd815ed24845ac38691847db99488a65ac9322f00308ac49bc950832c71d74ead749e5626f6d32aac8e6c26ffbab56f251
7
- data.tar.gz: b42b148b85ca250b0dacda4e78800743fb98d52b1a71114eb70dadd7f48c59f118c20d79403f50ab02a2d58775c15a4d853d83cd6417f83d71b9b4adb69142d0
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") ? request.headers["Authorization"].try("split", "bearer").try(:last).try(:strip) : request.headers["Authorization"]
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
@@ -1,3 +1,3 @@
1
1
  module GrapeSimpleAuth
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  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.0
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-25 00:00:00.000000000 Z
11
+ date: 2018-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler