mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
refactoring
This commit is contained in:
parent
29e7f954f3
commit
9856a2a5c0
10 changed files with 31 additions and 33 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue