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
8 changes: 4 additions & 4 deletions pkg/auth/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ func (a *AuthorizationCodeGrant) Execute(ctx context.Context, ssoCfg *SSOConfig,

masSSOHost := masSSOCfg.AuthURL.Host

a.Logger.Info(a.Localizer.MustLocalize("login.log.info.loggingInMAS", localize.NewEntry("Host", masSSOHost)))
a.Logger.Debug(a.Localizer.MustLocalize("login.log.info.loggingInMAS", localize.NewEntry("Host", masSSOHost)))
// log in to MAS-SSO
if err := a.loginMAS(ctx, masSSOCfg); err != nil {
return err
}
a.Logger.Info(a.Localizer.MustLocalize("login.log.info.loggedIn"))
a.Logger.Info(a.Localizer.MustLocalize("login.log.info.loggedInMAS", localize.NewEntry("Host", masSSOHost)))
a.Logger.Debug(a.Localizer.MustLocalize("login.log.info.loggedInMAS", localize.NewEntry("Host", masSSOHost)))

return nil
}
Expand Down Expand Up @@ -96,7 +96,7 @@ func (a *AuthorizationCodeGrant) loginSSO(ctx context.Context, cfg *SSOConfig) e
pkceCodeChallenge := pkce.CreateChallenge(pkceCodeVerifier)
authCodeURL := oauthConfig.AuthCodeURL(state, *pkce.GetAuthCodeURLOptions(pkceCodeChallenge)...)
a.Logger.Debug("Opening Authorization URL:", authCodeURL)
a.Logger.Info()
a.Logger.Debug()

// create a localhost server to handle redirects and exchange tokens securely
sm := http.NewServeMux()
Expand Down Expand Up @@ -183,7 +183,7 @@ func (a *AuthorizationCodeGrant) loginMAS(ctx context.Context, cfg *SSOConfig) e

authCodeURL := oauthConfig.AuthCodeURL(state, *pkce.GetAuthCodeURLOptions(pkceCodeChallenge)...)
a.Logger.Debug("Opening Authorization URL:", authCodeURL)
a.Logger.Info()
a.Logger.Debug()

sm := http.NewServeMux()
server := http.Server{
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func runLogin(opts *Options) (err error) {

if err = loginExec.Execute(ctx, ssoCfg, masSsoCfg); err != nil {
if errors.Is(err, context.DeadlineExceeded) {
return errors.New(opts.localizer.MustLocalize("login.error.context.deadline.exceeded"))
return opts.localizer.MustLocalizeError("login.error.context.deadline.exceeded")
}

return err
Expand Down