2020-05-12 01:26:09 +00:00
|
|
|
const saml_routes = {
|
|
|
|
prefix: '/api/v1/saml',
|
|
|
|
|
|
|
|
middleware: [
|
2020-05-17 04:55:08 +00:00
|
|
|
'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
|