mirror of
https://github.com/int128/kubelogin.git
synced 2026-02-14 16:39:51 +00:00
Set auth style when no client secret in use (#1289)
Co-authored-by: Hidetake Iwata <int128@gmail.com>
This commit is contained in:
@@ -62,11 +62,17 @@ func (f *Factory) New(ctx context.Context, prov oidc.Provider, tlsClientConfig t
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not determine supported PKCE methods: %w", err)
|
||||
}
|
||||
|
||||
endpoint := provider.Endpoint()
|
||||
if prov.ClientSecret == "" {
|
||||
endpoint.AuthStyle = oauth2.AuthStyleInParams
|
||||
}
|
||||
|
||||
return &client{
|
||||
httpClient: httpClient,
|
||||
provider: provider,
|
||||
oauth2Config: oauth2.Config{
|
||||
Endpoint: provider.Endpoint(),
|
||||
Endpoint: endpoint,
|
||||
ClientID: prov.ClientID,
|
||||
ClientSecret: prov.ClientSecret,
|
||||
RedirectURL: prov.RedirectURL,
|
||||
|
||||
Reference in New Issue
Block a user