Skip to content

Commit 487d90a

Browse files
committed
mod_unified_push: increase max expiration to 60 days and default 7 days
Signed-off-by: stratself <126093083+stratself@users.noreply.github.com>
1 parent 99e7ff2 commit 487d90a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mod_unified_push/src/mod_unified_push.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ get_jwk(Host) ->
239239
-spec mod_opt_type(atom()) -> econf:validator().
240240
mod_opt_type(expiration) ->
241241
%% TODO is there an upper bound for the validity of the JWT token?
242-
econf:int(0, 86400); %% 60 * 60 * 24
242+
econf:int(0, 604800); %% 86400 * 7
243243
mod_opt_type(jwk) ->
244244
econf:map(econf:binary(), econf:either(econf:binary(), econf:int()));
245245
mod_opt_type(push_url) ->
@@ -248,7 +248,7 @@ mod_opt_type(push_url) ->
248248
-spec mod_options(binary()) -> [{atom(), any()}].
249249
mod_options(_Host) ->
250250
[
251-
{expiration, 60 * 15},
251+
{expiration, 86400 * 60},
252252
{jwk, jose_jwk:to_map(jose_jwk:generate_key({oct, 128}))},
253253
{push_url, <<"auto">>}
254254
].
@@ -281,7 +281,7 @@ mod_doc() ->
281281
?T(
282282
"Every generated push URL will be valid only "
283283
"for the specified interval, in seconds. "
284-
"The default value is 15 minutes: '900'"
284+
"The default value is 7 days: '604800'"
285285
)
286286
}},
287287
{jwk, #{
@@ -315,7 +315,7 @@ mod_doc() ->
315315
"",
316316
"modules:",
317317
" mod_unified_push:",
318-
" expiration: 120",
318+
" expiration: 259200",
319319
" jwk: {\"k\" => \"a4-...\",\"kty\" => \"oct\"}"
320320
]
321321
}.

0 commit comments

Comments
 (0)