You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
planka_custom/server/api/controllers/authentication/saml/metadata.js

23 lines
353 B
JavaScript

module.exports = {
inputs: {
id: {
type: 'string',
required: true,
},
},
exits: {
invalidId: {
responseType: 'notFound',
},
},
async fn(inputs) {
const { sp } = await sails.helpers.saml.getConfig(inputs.id);
this.res.setHeader('Content-Type', 'text/xml');
return sp.create_metadata();
},
};