Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Commit

Permalink
check_cookie -> check_token
Browse files Browse the repository at this point in the history
We're not exclusively seeing Cookie.
  • Loading branch information
Nick Bargnesi committed Mar 30, 2016
1 parent da3d468 commit 29eb920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/openbel/api/middleware/auth.rb
Expand Up @@ -13,7 +13,7 @@ def self.decode(token, secret, verify, options)
::JWT.decode(token, secret, verify, options)
end

def self.check_cookie(env)
def self.check_token(env)
cookie_hdr = env['HTTP_COOKIE']
auth_hdr = env['HTTP_AUTHORIZATION']
if cookie_hdr.nil? and auth_hdr.nil?
Expand Down Expand Up @@ -90,7 +90,7 @@ def call(env)

if check
begin
JWTMiddleware.check_cookie(env)
JWTMiddleware.check_token(env)
rescue Exception => e
return _401(e.message)
end
Expand Down

0 comments on commit 29eb920

Please sign in to comment.