Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Implement SSO login initial changes
Browse files Browse the repository at this point in the history
Fixed linting

Signed-off-by: Anand Vasudevan <[email protected]>
  • Loading branch information
Anand Vasudevan committed Sep 1, 2020
1 parent 9b57935 commit 663e8c8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions clientapi/routing/sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func SSOTicket(
ssoURL.RawQuery = ssoQueries.Encode()

// validate the ticket
casUsername, err := validateTicket(ticket, cfg)
casUsername, err := validateTicket(ticket)
if err != nil {
// TODO: should I be logging these? What else should I log?
util.GetLogger(req.Context()).WithError(err).Error("CAS SSO ticket validation failed")
Expand All @@ -132,10 +132,7 @@ func SSOTicket(

// pass the ticket to the sso server to get it validated
// the CAS server responds with an xml which contains the username
func validateTicket(
ssoURL string,
cfg *config.ClientAPI,
) (string, error) {
func validateTicket(ssoURL string) (string, error) {
// make the call to the sso server to validate
response, err := http.Get(ssoURL)
if err != nil {
Expand Down

0 comments on commit 663e8c8

Please sign in to comment.