mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added verbose print to show ID and access tokens from IDP
This commit is contained in:
parent
a0cca97e7d
commit
8c01ba897f
1 changed files with 3 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ func NewJwtBearerFlow(eps JwtBearerFlowEndpoints, params JwtBearerFlowParams) (s
|
||||||
if client == nil {
|
if client == nil {
|
||||||
return "", fmt.Errorf("invalid client (client is 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 != "" {
|
if accessToken != "" {
|
||||||
_, err := jws.Verify([]byte(accessToken), jws.WithKeySet(client.Provider.KeySet), jws.WithValidateKey(true))
|
_, err := jws.Verify([]byte(accessToken), jws.WithKeySet(client.Provider.KeySet), jws.WithValidateKey(true))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue