File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -624,6 +624,7 @@ def find_service(iface, **kw):
624
624
assert response == {
625
625
"success" : True ,
626
626
"token" : "raw-macaroon" ,
627
+ "expires" : 900 ,
627
628
}
628
629
629
630
assert oidc_service .verify_jwt_signature .calls == [
@@ -725,6 +726,7 @@ def find_service(iface, **kw):
725
726
assert response == {
726
727
"success" : True ,
727
728
"token" : "raw-macaroon" ,
729
+ "expires" : 900 ,
728
730
}
729
731
730
732
assert oidc_service .verify_jwt_signature .calls == [
Original file line number Diff line number Diff line change @@ -39,6 +39,10 @@ class JsonResponse(TypedDict, total=False):
39
39
message : str | None
40
40
errors : list [Error ] | None
41
41
token : StrictStr | None
42
+ # This value is used to communicate the minted token's expiration
43
+ # time to the user. It is not used to determine the expiration,
44
+ # changing this field does not change the token's expiration time.
45
+ expires : int | None
42
46
success : bool | None
43
47
44
48
@@ -340,7 +344,7 @@ def mint_token(
340
344
metrics = request .find_service (IMetricsService , context = None )
341
345
metrics .increment ("warehouse.oidc.mint_token.github_reusable_workflow" )
342
346
343
- return {"success" : True , "token" : serialized }
347
+ return {"success" : True , "token" : serialized , "expires" : expires_at }
344
348
345
349
346
350
def is_from_reusable_workflow (
You can’t perform that action at this time.
0 commit comments