From 5f04dc4f45b9657d46380499f92ae6e5c1bf5506 Mon Sep 17 00:00:00 2001 From: enahum Date: Tue, 5 Jul 2016 15:49:00 -0400 Subject: SAML support (#3494) * PLT-3073: Implement SAML/Okta Server side (EE) (#3422) * PLT-3137 Support for SAML configuration * PLT-3410 SAML Database Store * PLT-3411 CLI to add Identity Provider Certificate and Service Provider Private Key * PLT-3409 SAML Interface for EE * PLT-3139 Handle SAML authentication server side * Add localization messages * PLT-3443 SAML Obtain SP metadata * PLT-3142 Login & Switch to/from SAML * Remove Certs for Database & Clean SAML Request * Make required Username, FirstName and LastName * PLT-3140 Add SAML to System Console (#3476) * PLT-3140 Add SAML to System Console * Move web_client functions to client.jsx * Fix issues found by PM * update package.json mattermost driver * Fix text messages for SAML --- api/context.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'api/context.go') diff --git a/api/context.go b/api/context.go index 1c0dae299..93ff83247 100644 --- a/api/context.go +++ b/api/context.go @@ -477,6 +477,11 @@ func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) link := "/" linkMessage := T("api.templates.error.link") + status := http.StatusTemporaryRedirect + if err.StatusCode != http.StatusInternalServerError { + status = err.StatusCode + } + http.Redirect( w, r, @@ -485,7 +490,7 @@ func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request) "&details="+url.QueryEscape(details)+ "&link="+url.QueryEscape(link)+ "&linkmessage="+url.QueryEscape(linkMessage), - http.StatusTemporaryRedirect) + status) } func Handle404(w http.ResponseWriter, r *http.Request) { -- cgit v1.2.3-1-g7c22