From 8fe917b79fa47948538fcce97f6e640261c56b03 Mon Sep 17 00:00:00 2001 From: David Allen Date: Wed, 12 Jun 2024 12:44:28 -0600 Subject: [PATCH] Added verbose print to show access and ID token from IDP --- internal/flows/jwt_bearer.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/flows/jwt_bearer.go b/internal/flows/jwt_bearer.go index 2e93265..3c2e9cb 100644 --- a/internal/flows/jwt_bearer.go +++ b/internal/flows/jwt_bearer.go @@ -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 {