Sha256: d37491ad46700efe35f269a69bd69a64db1b107924e6461d08210d24d614e114

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

module ActiveRecord::Jwt
  class DecoderConfiguration
    attr_accessor :sub, :algorithm, :key, :class, :exp, :iss, :aud, :iat

    def initialize
      self.sub       = :id
      self.algorithm = 'HS256'
      self.class     = true
      self.exp       = true
      self.iss       = 'issuer'
      self.aud       = 'audience'
      self.iat       = true
    end

    def options
      {
        algorithm:         self.algorithm,
        verify_expiration: self.exp.present?,
        verify_iss:        self.iss.present?,
        verify_aud:        self.aud.present?,
        verify_iat:        self.iat.present?,
        'iss' => self.iss,
        'aud' => self.aud
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord-jwt-0.0.1 lib/activerecord-jwt/decoder_configuration.rb