Skip to content

Commit abc46f2

Browse files
authored
pkg/agent/auth/keycloak.go (#398)
Signed-off-by: k124k3n <k124k3n@gmail.com>
1 parent 88d6718 commit abc46f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/agent/auth/keycloak.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package auth
22

33
import (
4+
"context"
45
"fmt"
56
"net/http"
67
"os"
78
"strings"
89
"time"
9-
"context"
1010

11-
"github.com/pardot/oidc/discovery"
1211
keyfunc "github.com/MicahParks/keyfunc/v2"
1312
jwt "github.com/golang-jwt/jwt/v5"
13+
"github.com/pardot/oidc/discovery"
1414
"github.com/pkg/errors"
1515
)
1616

@@ -87,7 +87,7 @@ func NewKeycloakVerifier(httpjwks bool, issuerURL string, audience string) (*Key
8787
// perform OIDC discovery
8888
oidcClient, err := discovery.NewClient(context.Background(), issuerURL)
8989
if err != nil {
90-
return nil, errors.Errorf("Could not set up OIDC Discovery client: %v", err)
90+
return nil, errors.Errorf("Could not set up OIDC Discovery client with issuer = '%s': %v", issuerURL, err)
9191
}
9292
oidcClientMetadata := oidcClient.Metadata()
9393
jwksURL := oidcClientMetadata.JWKSURI
@@ -100,7 +100,7 @@ func NewKeycloakVerifier(httpjwks bool, issuerURL string, audience string) (*Key
100100
api_permissions, role_mappings := getAuthLogic()
101101
return &KeycloakVerifier{
102102
jwks: jwks,
103-
audience: audience,
103+
audience: audience,
104104
jwksURL: jwksURL,
105105
api_permissions: api_permissions,
106106
role_mappings: role_mappings,

0 commit comments

Comments
 (0)