Skip to content

Commit

Permalink
Test UTC when verify OIDC Token
Browse files Browse the repository at this point in the history
  • Loading branch information
akiioto committed Oct 23, 2024
1 parent 0ba5f3b commit 007f7ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/oidc/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package oidc
import (
"errors"
"fmt"
"time"

"github.com/coreos/go-oidc/v3/oidc"
"github.com/go-jose/go-jose/v4"
Expand Down Expand Up @@ -169,6 +170,10 @@ func NewVerifierConfig(logger LoggerInterface, clientID string, options ...Verif
verifierConfig.InsecureSkipSignatureCheck = false
verifierConfig.SupportedSigningAlgs = SupportedSigningAlgorithms

verifierConfig.Now = func() time.Time {
return time.Now().UTC()
}

logger.Debugw("Created Verifier config with default values",
"clientID", clientID,
"SkipClientIDCheck", verifierConfig.SkipClientIDCheck,
Expand Down

0 comments on commit 007f7ba

Please sign in to comment.