|
|
|
@ -17,7 +17,9 @@ class SAMLRequestMiddleware extends Middleware {
|
|
|
|
|
// Verify that the issuer is known
|
|
|
|
|
const sp = await ServiceProvider.findOne({entity_id: data.issuer, active: true})
|
|
|
|
|
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 = {
|
|
|
|
|
relay_state: req.query.RelayState || req.body.RelayState,
|
|
|
|
|