Fix format of SAML middleware error throw
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is failing

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

View File

@ -17,7 +17,9 @@ 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, 'Unable to continue. The SAML issuer is unknown.') return res.error(401, {
message: '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,