Fix format of SAML middleware error throw
This commit is contained in:
parent
cb783ea277
commit
2fe1d499f6
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user