Skip to content

Commit 661af28

Browse files
author
Enda
committed
fix: add token endpoint URL to credentials file (redhat-developer#1177)
1 parent 9199834 commit 661af28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/cmd/serviceaccount/resetcredentials/reset_credentials.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,15 @@ func runResetCredentials(opts *options) (err error) {
158158

159159
opts.Logger.Info(opts.localizer.MustLocalize("serviceAccount.resetCredentials.log.info.resetSuccess", localize.NewEntry("Name", updatedServiceAccount.GetName())))
160160

161+
cfg, err := opts.Config.Load()
162+
if err != nil {
163+
return err
164+
}
165+
161166
creds := &credentials.Credentials{
162167
ClientID: updatedServiceAccount.GetClientId(),
163168
ClientSecret: updatedServiceAccount.GetClientSecret(),
169+
TokenURL: cfg.MasAuthURL + "/protocol/openid-connect/token",
164170
}
165171

166172
// save the credentials to a file

0 commit comments

Comments
 (0)