Sha256: 0d96f9410011e19d4ae2e44b1f658c287df83e0697f42b6486243582e97fe214
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module SolidusJwt module Decodeable ## # Decode a token generated by SolidusJwt # @see https://github.com/jwt/ruby-jwt # # @example decode a token. # SolidusJwt.decode('abc.123.efg') # #=> [{"sub"=>"1234567890", "name"=>"John Doe", "iat"=>1516239022}, {"alg"=>"HS256", "typ"=>"JWT"}] # # @param token [String] The token to decode # @return [Array<Hash>] # def decode(token) JWT.decode(token, SolidusJwt::Config.jwt_secret, true, algorithm: SolidusJwt::Config.jwt_algorithm) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_jwt-1.1.0 | lib/solidus_jwt/concerns/decodeable.rb |