Added verbose print to show ID and access tokens from IDP

This commit is contained in:
David Allen 2024-06-12 12:50:53 -06:00
parent a0cca97e7d
commit 8c01ba897f
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -51,6 +51,9 @@ func NewJwtBearerFlow(eps JwtBearerFlowEndpoints, params JwtBearerFlowParams) (s
if client == nil {
return "", fmt.Errorf("invalid client (client is nil)")
}
if verbose {
fmt.Printf("ID token (IDP): %s\n access token (IDP): %s", accessToken, idToken)
}
if accessToken != "" {
_, err := jws.Verify([]byte(accessToken), jws.WithKeySet(client.Provider.KeySet), jws.WithValidateKey(true))
if err != nil {