Class: FreshJwt::Payload

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer, Entity::Callable
Defined in:
lib/fresh_jwt/payload.rb

Instance Method Summary collapse

Methods included from Entity::Callable

call

Instance Method Details

#default_payloadObject



25
26
27
# File 'lib/fresh_jwt/payload.rb', line 25

def default_payload
  @default_payload ||= self.class.dry_initializer.attributes(self).slice(:jti, :iat, :exp)
end

#to_hashObject



29
30
31
# File 'lib/fresh_jwt/payload.rb', line 29

def to_hash
  @params ||= default_payload.merge(extend)
end