[java-idp-plugin-oidc-op-oidfed] 02/02: Fix the expiration time in request object tests to be epoch seconds.

Codeberg noreply at shibboleth.net
Thu Oct 1 07:49:40 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository java-idp-plugin-oidc-op-oidfed.

View the commit online:
https://codeberg.org/Shibboleth/java-idp-plugin-oidc-op-oidfed/commit/1ede2de36abdf56ce8cb1fb16aa01791d9f0315d

commit 1ede2de36abdf56ce8cb1fb16aa01791d9f0315d
Author: Henri Mikkonen <henri.mikkonen at iki.fi>
AuthorDate: Thu Oct 1 10:48:50 2026 +0300

    Fix the expiration time in request object tests to be epoch seconds.
    
    - Also included cases to test expired request objects
---
 .../AuthorizeFlowAutomaticRegistrationTest.java    | 105 +++++++++++++++------
 ...shedAuthorizeFlowAutomaticRegistrationTest.java |  44 ++++++---
 2 files changed, 109 insertions(+), 40 deletions(-)

diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
index 8f41d3b..097a095 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/AuthorizeFlowAutomaticRegistrationTest.java
@@ -91,7 +91,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                 launchAuthenticationRequest(clientId, "openid profile", plainRequestObject(Map.of(
                         "iss", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -109,7 +109,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -136,7 +136,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -172,7 +172,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -186,6 +186,24 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
         Assert.assertEquals(unwrapTrustChainFromAuthorizeCode(successResponse), List.of(clientId, anchorId));
     }
 
+    @Test
+    public void testWithValidTrustChain_signedRequestObject_expired()
+            throws IOException, UnsupportedOperationException, URISyntaxException {
+        final String clientId = uniqueClientId();
+        rpConfigureMockHttpClient(clientId);
+        final FlowExecutionResult result =
+                launchAuthenticationRequest(clientId, "openid profile", signedRequestObject(Map.of(
+                        "iss", clientId,
+                        "client_id", clientId,
+                        "aud", issuer,
+                        "exp", Instant.now().minus(Duration.ofMinutes(5)).getEpochSecond(),
+                        "jti", UUID.randomUUID(),
+                        "response_type", "code",
+                        "scope", "openid profile",
+                        "redirect_uri", redirectUri)));
+        assertErrorCode(result, "invalid_request_object");
+    }
+
     @Test
     public void testWithValidTrustChain_signedRequestObject_nonExistingSignedJwksUri()
             throws IOException, UnsupportedOperationException, URISyntaxException {
@@ -201,7 +219,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -220,7 +238,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -238,7 +256,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -256,7 +274,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -274,7 +292,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -293,7 +311,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -317,7 +335,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -336,7 +354,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -355,7 +373,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -375,7 +393,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -402,7 +420,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -420,7 +438,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -438,7 +456,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "response_type", "code",
                         "scope", "openid profile",
                         "redirect_uri", redirectUri)));
@@ -472,7 +490,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId + "2",
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -489,7 +507,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                 launchAuthenticationRequest(clientId, "openid profile", signedRequestObject(Map.of(
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -507,7 +525,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId + "2",
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -524,7 +542,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                 launchAuthenticationRequest(clientId, "openid profile", signedRequestObject(Map.of(
                         "iss", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -543,7 +561,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "client_id", clientId,
                         "sub", "mockValue",
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -561,7 +579,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", List.of(issuer, "https://another.example.org"),
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -590,7 +608,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -604,6 +622,35 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
         Assert.assertEquals(unwrapTrustChainFromAuthorizeCode(successResponse), List.of(clientId, anchorId));
     }
 
+    @Test
+    public void testWithPushedValidTrustChain_signedRequestObject_expired()
+            throws IOException, UnsupportedOperationException, URISyntaxException {
+        final String clientId = uniqueClientId();
+
+        final List<String> trustChain = List.of(
+                rpEntityConfiguration(clientId),
+                subordinateStatement(clientId, Map.of("openid_relying_party",
+                        new OIDCClientMetadata().toJSONObject())),
+                trustedAnchorConfiguration());
+        final JWSHeader header = new JWSHeader.Builder(JWSAlgorithm.RS256)
+                .type(new JOSEObjectType("entity-statement+jwt"))
+                .keyID(rpKey.getKeyID())
+                .customParam("trust_chain", trustChain)
+                .build();
+
+        final FlowExecutionResult result =
+                launchAuthenticationRequest(clientId, "openid profile", signedRequestObject(Map.of(
+                        "iss", clientId,
+                        "client_id", clientId,
+                        "aud", issuer,
+                        "exp", Instant.now().minus(Duration.ofMinutes(5)).getEpochSecond(),
+                        "jti", UUID.randomUUID(),
+                        "response_type", "code",
+                        "scope", "openid profile",
+                        "redirect_uri", redirectUri), header, rpKey));
+        assertErrorCode(result, "invalid_request_object");
+    }
+
     @Test
     public void testWithPushedValidTrustChain_signedRequestObject_differentEntityIds()
             throws IOException, UnsupportedOperationException, URISyntaxException {
@@ -625,7 +672,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -654,7 +701,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -702,7 +749,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -721,7 +768,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
@@ -741,7 +788,7 @@ public class AuthorizeFlowAutomaticRegistrationTest extends AbstractFederationFl
                         "iss", clientId,
                         "client_id", clientId,
                         "aud", issuer,
-                        "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                        "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                         "jti", UUID.randomUUID(),
                         "response_type", "code",
                         "scope", "openid profile",
diff --git a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/PushedAuthorizeFlowAutomaticRegistrationTest.java b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/PushedAuthorizeFlowAutomaticRegistrationTest.java
index 59fefaf..e0d0ffa 100644
--- a/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/PushedAuthorizeFlowAutomaticRegistrationTest.java
+++ b/idp-oidfed-op-impl/src/test/java/net/shibboleth/idp/plugin/oidc/op/profile/flow/oidfed/PushedAuthorizeFlowAutomaticRegistrationTest.java
@@ -181,7 +181,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -193,6 +193,28 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 parseSuccessResponse(result, PushedAuthorizationSuccessResponse.class);
         verifyAuthorizeEndpoint(clientId, response.getRequestURI().toString());
     }
+    @Test
+    public void testWithPublicClientWithSignedRequestObject_expired() throws Exception {
+        final OIDCClientMetadata metadata = new OIDCClientMetadata();
+        metadata.setRedirectionURI(new URI(redirectUri));
+        metadata.setResponseTypes(Set.of(ResponseType.CODE));
+        metadata.setJWKSet(new JWKSet(rpKey.toPublicJWK()));
+        metadata.setTokenEndpointAuthMethod(ClientAuthenticationMethod.NONE);
+        final String clientId = uniqueClientId();
+        rpConfigureMockHttpClient(clientId, metadata);
+        setHttpFormRequest("POST", createRequestParameters(clientId, "openid", "code", signedRequestObject(Map.of(
+                "client_id", clientId,
+                "iss", clientId,
+                "aud", issuer,
+                "exp", Instant.now().minus(Duration.ofMinutes(5)).getEpochSecond(),
+                "jti", UUID.randomUUID(),
+                "response_type", "code",
+                "scope", "openid",
+                "redirect_uri", redirectUri)).serialize()));
+        final FlowExecutionResult result =
+                flowExecutor.launchExecution(PushedAuthorizeFlowTest.FLOW_ID, null, externalContext);
+        assertErrorCode(result, OAuth2Error.INVALID_REQUEST_CODE);
+    }
 
     @Test
     public void testWithPublicClientWithSignedRequestObject_missingJti() throws Exception {
@@ -207,7 +229,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "response_type", "code",
                 "scope", "openid",
                 "redirect_uri", redirectUri)).serialize()));
@@ -228,7 +250,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
         setHttpFormRequest("POST", createRequestParameters(clientId, "openid", "code", signedRequestObject(Map.of(
                 "client_id", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -251,7 +273,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId + "2",
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -273,7 +295,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
         setHttpFormRequest("POST", createRequestParameters(clientId, "openid", "code", signedRequestObject(Map.of(
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -296,7 +318,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId + "2",
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -342,7 +364,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "sub", "mockValue",
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -365,7 +387,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", List.of(issuer, "https://additional.example.org"),
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -388,7 +410,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -423,7 +445,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",
@@ -461,7 +483,7 @@ public class PushedAuthorizeFlowAutomaticRegistrationTest extends AbstractFedera
                 "client_id", clientId,
                 "iss", clientId,
                 "aud", issuer,
-                "exp", Instant.now().plus(Duration.ofMinutes(5)).toEpochMilli(),
+                "exp", Instant.now().plus(Duration.ofMinutes(5)).getEpochSecond(),
                 "jti", UUID.randomUUID(),
                 "response_type", "code",
                 "scope", "openid",

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list