Skip to content

Commit

Permalink
pkg/agent/auth/keycloak.go (#398)
Browse files Browse the repository at this point in the history
Signed-off-by: k124k3n <k124k3n@gmail.com>
  • Loading branch information
nesangcode authored Apr 9, 2024
1 parent 88d6718 commit abc46f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/agent/auth/keycloak.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package auth

import (
"context"
"fmt"
"net/http"
"os"
"strings"
"time"
"context"

"github.com/pardot/oidc/discovery"
keyfunc "github.com/MicahParks/keyfunc/v2"
jwt "github.com/golang-jwt/jwt/v5"
"github.com/pardot/oidc/discovery"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -87,7 +87,7 @@ func NewKeycloakVerifier(httpjwks bool, issuerURL string, audience string) (*Key
// perform OIDC discovery
oidcClient, err := discovery.NewClient(context.Background(), issuerURL)
if err != nil {
return nil, errors.Errorf("Could not set up OIDC Discovery client: %v", err)
return nil, errors.Errorf("Could not set up OIDC Discovery client with issuer = '%s': %v", issuerURL, err)
}
oidcClientMetadata := oidcClient.Metadata()
jwksURL := oidcClientMetadata.JWKSURI
Expand All @@ -100,7 +100,7 @@ func NewKeycloakVerifier(httpjwks bool, issuerURL string, audience string) (*Key
api_permissions, role_mappings := getAuthLogic()
return &KeycloakVerifier{
jwks: jwks,
audience: audience,
audience: audience,
jwksURL: jwksURL,
api_permissions: api_permissions,
role_mappings: role_mappings,
Expand Down

0 comments on commit abc46f2

Please sign in to comment.