Revert: SAML request middleware - pass error, not string
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2021-08-22 20:05:21 -05:00
parent 2f2d38d12f
commit cb783ea277
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -17,7 +17,7 @@ class SAMLRequestMiddleware extends Middleware {
// Verify that the issuer is known // Verify that the issuer is known
const sp = await ServiceProvider.findOne({entity_id: data.issuer, active: true}) const sp = await ServiceProvider.findOne({entity_id: data.issuer, active: true})
if (!sp) if (!sp)
return res.error(401, new Error('Unable to continue. The SAML issuer is unknown.')) return res.error(401, 'Unable to continue. The SAML issuer is unknown.')
req.saml_request = { req.saml_request = {
relay_state: req.query.RelayState || req.body.RelayState, relay_state: req.query.RelayState || req.body.RelayState,