Added verbose print to show access and ID token from IDP

This commit is contained in:
David Allen 2024-06-12 12:44:28 -06:00
parent e929fac09e
commit 8fe917b79f
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC

View file

@ -51,6 +51,10 @@ 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 {