Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: pmahindrakar-oss <[email protected]>
  • Loading branch information
pmahindrakar-oss committed Feb 6, 2024
1 parent 571d2e7 commit 28e6f53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flyteadmin/auth/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func GetLoginHandler(ctx context.Context, authCtx interfaces.AuthenticationConte
}
}

idpUrl, err := url.Parse(urlString)
idpURL, err := url.Parse(urlString)
if err != nil {
logger.Errorf(ctx, "failed to parse url %q: %v", urlString, err)
writer.WriteHeader(http.StatusInternalServerError)
Expand All @@ -166,12 +166,12 @@ func GetLoginHandler(ctx context.Context, authCtx interfaces.AuthenticationConte
idpQueryParam := authCtx.Options().UserAuth.IDPQueryParameter
if len(idpQueryParam) > 0 && queryParams.Get(idpQueryParam) != "" {
logger.Infof(ctx, "Adding IDP Query Parameter to the URL")
query := idpUrl.Query() // Gets a copy of query parameters
query := idpURL.Query() // Gets a copy of query parameters
query.Add(idpQueryParam, queryParams.Get(idpQueryParam))
// Updates the rawquery with the new query parameters
idpUrl.RawQuery = query.Encode()
idpURL.RawQuery = query.Encode()
}
http.Redirect(writer, request, idpUrl.String(), http.StatusTemporaryRedirect)
http.Redirect(writer, request, idpURL.String(), http.StatusTemporaryRedirect)
}
}

Expand Down

0 comments on commit 28e6f53

Please sign in to comment.