Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove mas-auth url #1708

Merged
merged 3 commits into from
Aug 9, 2022
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
15 changes: 7 additions & 8 deletions docs/commands/rhoas_login.md

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

2 changes: 0 additions & 2 deletions pkg/cmd/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ type options struct {

url string
authURL string
deprecatedUrl string
clientID string
scopes []string
insecureSkipTLSVerify bool
Expand Down Expand Up @@ -94,7 +93,6 @@ func NewLoginCmd(f *factory.Factory) *cobra.Command {
cmd.Flags().BoolVar(&opts.insecureSkipTLSVerify, "insecure", false, opts.localizer.MustLocalize("login.flag.insecure"))
cmd.Flags().StringVar(&opts.clientID, "client-id", build.DefaultClientID, opts.localizer.MustLocalize("login.flag.clientId"))
cmd.Flags().StringVar(&opts.authURL, "auth-url", build.ProductionAuthURL, opts.localizer.MustLocalize("login.flag.authUrl"))
cmd.Flags().StringVar(&opts.deprecatedUrl, "mas-auth-url", "", opts.localizer.MustLocalize("login.flag.masAuthUrl"))
cmd.Flags().BoolVar(&opts.printURL, "print-sso-url", false, opts.localizer.MustLocalize("login.flag.printSsoUrl"))
cmd.Flags().StringArrayVar(&opts.scopes, "scope", kcconnection.DefaultScopes, opts.localizer.MustLocalize("login.flag.scope"))
cmd.Flags().StringVarP(&opts.offlineToken, "token", "t", "", opts.localizer.MustLocalize("login.flag.token", localize.NewEntry("OfflineTokenURL", build.OfflineTokenURL)))
Expand Down
7 changes: 0 additions & 7 deletions pkg/core/localize/locales/en/cmd/login.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ one = 'OpenID client identifier'
description = 'Description for the --auth-url flag'
one = "The URL of the SSO Authentication server"

[login.flag.masAuthUrl]
one = "Unused: This flag is no longer valid and will be removed in a future release"

[login.flag.token]
one = "Log in using an offline token, which can be obtained at {{.OfflineTokenURL}}"

Expand All @@ -65,10 +62,6 @@ one = 'Welcome to RHOAS'
description = 'Title for the RHOAS login redirect webpage'
one = 'You are now logged in as <span style="font-weight:700">{{.Username}}</span>.'

[login.masRedirectPage.body]
description = 'Title for the identity.api.openshift.com login redirect webpage'
one = 'You are now logged in to <span style="font-weight:700">{{.Host}}</span> as <span style="font-weight:700">{{.Username}}</span>.'

[login.error.schemeMissingFromUrl]
description = 'Error message for when scheme is missing from the Auth URL'
one = 'scheme missing from URL "{{.URL}}". Please add either "https" or "https"'
Expand Down
12 changes: 0 additions & 12 deletions pkg/shared/connection/kcconnection/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,10 @@ type AuthError struct {
Err error
}

type MasAuthError struct {
Err error
}

func (e *AuthError) Error() string {
return fmt.Sprintf("%v", e.Err)
}

func (e *MasAuthError) Unwrap() error {
return e.Err
}

func (e *MasAuthError) Error() string {
return fmt.Sprintf("%v", e.Err)
}

func (e *AuthError) Unwrap() error {
return e.Err
}
Expand Down