refactoring

This commit is contained in:
olegphenomenon 2022-03-29 14:07:36 +03:00
parent 29e7f954f3
commit 9856a2a5c0
10 changed files with 31 additions and 33 deletions

View file

@ -18,13 +18,13 @@ module EisBilling
end
def decoded_token
if auth_header
token = auth_header.split(' ')[1]
begin
JWT.decode(token, billing_secret_key, true, algorithm: 'HS256')
rescue JWT::DecodeError
nil
end
return unless auth_header
token = auth_header.split(' ')[1]
begin
JWT.decode(token, billing_secret_key, true, algorithm: 'HS256')
rescue JWT::DecodeError
nil
end
end