CoreID/app/routing/routers/api/v1/saml.routes.js

42 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-05-12 01:26:09 +00:00
const saml_routes = {
prefix: '/api/v1/saml',
middleware: [
'auth:APIRoute',
2020-05-12 01:26:09 +00:00
],
get: {
'/providers': [
['middleware::api:Permission', { check: 'v1:saml:providers:list' }],
'controller::api:v1:SAML.get_providers',
],
'/providers/:id': [
['middleware::api:Permission', { check: 'v1:saml:providers:get' }],
'controller::api:v1:SAML.get_provider',
],
},
post: {
'/providers': [
['middleware::api:Permission', { check: 'v1:saml:providers:create' }],
'controller::api:v1:SAML.create_provider',
],
},
patch: {
'/providers/:id': [
['middleware::api:Permission', { check: 'v1:saml:providers:update' }],
'controller::api:v1:SAML.update_provider',
],
},
delete: {
'/providers/:id': [
['middleware::api:Permission', { check: 'v1:saml:providers:delete' }],
'controller::api:v1:SAML.delete_provider',
],
},
}
module.exports = exports = saml_routes