Skip to content

Commit

Permalink
fix: context background for well-known call
Browse files Browse the repository at this point in the history
fix: context background for well-known call
  • Loading branch information
stebenz authored Sep 3, 2024
2 parents cf4d43e + 2a882c2 commit 3cb2d3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zitadel/helper/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ func GetClientInfo(ctx context.Context, insecure bool, domain string, token stri
options := make([]zitadel.Option, 0)
keyPath := ""
if token != "" {
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromPath(ctx, token)))
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromPath(context.Background(), token)))
keyPath = token
} else if jwtProfileFile != "" {
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromPath(ctx, jwtProfileFile)))
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromPath(context.Background(), jwtProfileFile)))
keyPath = jwtProfileFile
} else if jwtProfileJSON != "" {
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromFileData(ctx, []byte(jwtProfileJSON))))
options = append(options, zitadel.WithJWTProfileTokenSource(middleware.JWTProfileFromFileData(context.Background(), []byte(jwtProfileJSON))))
} else {
return nil, fmt.Errorf("either 'jwt_profile_file' or 'jwt_profile_json' is required")
}
Expand Down

0 comments on commit 3cb2d3b

Please sign in to comment.