Skip to content

Commit

Permalink
Merge branch 'feature/#5524/auth-tests' into 'develop'
Browse files Browse the repository at this point in the history
feature(#5524): Add LDAP/CAS/SAML/OAUTH2 functional tests

See merge request canopsis/canopsis-pro!4059
  • Loading branch information
samyscoub committed Aug 13, 2024
2 parents 45ead22 + 02b4b45 commit e779064
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ func (p *provider) Callback(c *gin.Context) {
panic(err)
}

if len(session.Values) == 0 {
panic(errors.New("session is empty"))
}

// expire auth session
session.Options.MaxAge = -1
err = session.Save(c.Request, c.Writer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (p *provider) SamlAcsHandler() gin.HandlerFunc {
query.Set("access_token", accessToken)
relayUrl.RawQuery = query.Encode()

c.Redirect(http.StatusPermanentRedirect, relayUrl.String())
c.Redirect(http.StatusSeeOther, relayUrl.String())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,5 @@ server {
include /etc/nginx/cors.inc;
try_files $uri $uri/ /index.html;
error_page 404 /index.html;
# Working around SAML auth doing an HTTP request that Nginx
# won't accept (issue #3852)
error_page 405 =200 $uri;
}
}

0 comments on commit e779064

Please sign in to comment.