Its been a while
This commit is contained in:
@@ -13,7 +13,7 @@ class JsonWebToken
|
||||
# encode payload into a jwt
|
||||
# payload is usually like: { user_id: 1 }
|
||||
# exp = token expiration (default: 1 hour from now for better security)
|
||||
# jti = unique token identifier for blacklisting
|
||||
# jti = unique token identifier for retireing
|
||||
def self.encode(payload, exp = 1.hour.from_now)
|
||||
payload[:exp] = exp.to_i
|
||||
payload[:jti] ||= SecureRandom.uuid
|
||||
|
||||
Reference in New Issue
Block a user