fix(openid/client): cap client assertion lifetime to 5 seconds

This commit is contained in:
Trong Huu Nguyen
2026-08-06 12:57:36 +02:00
parent 20f9a50fe4
commit b870e8ec7b
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ var (
)
const (
DefaultClientAssertionLifetime = 30 * time.Second
DefaultClientAssertionLifetime = 5 * time.Second
)
type JwksProvider interface {
+2 -2
View File
@@ -24,7 +24,7 @@ func TestClientAuthenticationAssertion(t *testing.T) {
openidConfig.TestProvider.SetIssuer("some-issuer")
c := newTestClientWithConfig(openidConfig)
expiry := 30 * time.Second
expiry := client.DefaultClientAssertionLifetime
jwtAssertion, err := c.ClientAuthenticationAssertion(expiry)
assert.NoError(t, err)
@@ -102,7 +102,7 @@ func TestClientAuthenticationAssertionHeader(t *testing.T) {
openidConfig.TestProvider.SetIssuer("some-issuer")
c := newTestClientWithConfig(openidConfig)
expiry := 30 * time.Second
expiry := client.DefaultClientAssertionLifetime
jwtAssertion, err := c.ClientAuthenticationAssertion(expiry)
assert.NoError(t, err)