Fix rubocop offenses - Requires Ruby 3.1+
This commit is contained in:
@@ -11,7 +11,7 @@ module AuthenticatedUrlHelper
|
||||
COOKIE_EXPIRATION = 30.seconds
|
||||
|
||||
def sign(url, object)
|
||||
payload = {object_id: object.id, object_type: object.class.name, url: url, exp: TOKEN_EXPIRATION.from_now.to_i}
|
||||
payload = {object_id: object.id, object_type: object.class.name, url:, exp: TOKEN_EXPIRATION.from_now.to_i}
|
||||
token = JWT.encode payload, TOKEN_SECRET, TOKEN_ALGORITHM
|
||||
|
||||
add_query_parameters(url, {TOKEN_PARAM => token})
|
||||
@@ -58,7 +58,7 @@ module AuthenticatedUrlHelper
|
||||
|
||||
def prepare_short_living_cookie(value)
|
||||
{
|
||||
value: value,
|
||||
value:,
|
||||
expires: COOKIE_EXPIRATION.from_now,
|
||||
httponly: true,
|
||||
same_site: :strict,
|
||||
|
Reference in New Issue
Block a user