Sha256: e4ce89c2574b482c8e16ba710d28a8b8f0125a30d5cf512f66b4cef4d39a9ab4

Contents?: true

Size: 384 Bytes

Versions: 4

Compression:

Stored size: 384 Bytes

Contents

module SolidusJwt
  module Decodeable
    ##
    # Decode a token generated by SolidusJwt
    # @see https://github.com/jwt/ruby-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

4 entries across 4 versions & 1 rubygems

Version Path
solidus_jwt-1.0.0 lib/solidus_jwt/concerns/decodeable.rb
solidus_jwt-1.0.0.beta2 lib/solidus_jwt/concerns/decodeable.rb
solidus_jwt-1.0.0.beta1 lib/solidus_jwt/concerns/decodeable.rb
solidus_jwt-0.1.0 lib/solidus_jwt/concerns/decodeable.rb