mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-20 03:26:22 +00:00
fix(openid/client): cap client assertion lifetime to 5 seconds
This commit is contained in:
@@ -35,7 +35,7 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
DefaultClientAssertionLifetime = 30 * time.Second
|
||||
DefaultClientAssertionLifetime = 5 * time.Second
|
||||
)
|
||||
|
||||
type JwksProvider interface {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user