Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/commands/rhoas_kafka_consumer-group_reset-offset.adoc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/cmd/serviceaccount/resetcredentials/reset_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,15 @@ func runResetCredentials(opts *options) (err error) {

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

cfg, err := opts.Config.Load()
if err != nil {
return err
}

creds := &credentials.Credentials{
ClientID: updatedServiceAccount.GetClientId(),
ClientSecret: updatedServiceAccount.GetClientSecret(),
TokenURL: cfg.MasAuthURL + "/protocol/openid-connect/token",
Copy link
Collaborator

@wtrocki wtrocki Oct 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TokenURL: cfg.MasAuthURL + "/protocol/openid-connect/token",
TokenURL: cfg.MasAuthURL + serviceaccount.TOKEN_URL_SUFFIX,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, realistically we should not be concatenating the URL like this, rather use something like ResolveReference (or something else), in case there are extra characters.

u := baseURL.ResolveReference(&rel)

Just wanted a quick fix so I copy/pasted it for now :)

}

// save the credentials to a file
Expand Down