Class: Morpho::JWT::Token

Inherits:
Object
  • Object
show all
Defined in:
app/services/morpho/jwt/token.rb

Class Method Summary collapse

Class Method Details

.new(authentication_token) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'app/services/morpho/jwt/token.rb', line 4

def self.new(authentication_token)
  begin
    token = ::Morpho::JWT::Decode.new(authentication_token)

    HashWithIndifferentAccess.new(token.first)
  rescue
    HashWithIndifferentAccess.new
  end
end