CoreID/app/routing/routers/openid.routes.js

56 lines
1.5 KiB
JavaScript
Raw Normal View History

2020-08-13 06:56:33 +00:00
const openid = {
prefix: '/openid',
middleware: [
],
get: {
'/grant-and-save/:app_id/:uid': [
'middleware::auth:UserOnly', 'controller::OpenID.grant_and_save',
],
2020-08-13 06:56:33 +00:00
'/interaction/:uid': [
'controller::OpenID.handle_interaction',
],
'/interaction/:uid/start-session': [
'middleware::auth:UserOnly', 'controller::OpenID.start_session',
],
'/interaction/:uid/grant': [
'middleware::auth:UserOnly', 'controller::OpenID.process_grant',
],
'/clients': [
['middleware::api:Permission', { check: 'v1:openid:clients:list' }],
'controller::OpenID.get_clients',
],
'/clients/:id': [
['middleware::api:Permission', { check: 'v1:openid:clients:get' }],
'controller::OpenID.get_client',
],
},
post: {
'/clients': [
['middleware::api:Permission', { check: 'v1:openid:clients:create' }],
'controller::OpenID.create_client',
],
},
patch: {
'/clients/:id': [
['middleware::api:Permission', { check: 'v1:openid:clients:update' }],
'controller::OpenID.update_client',
],
},
delete: {
'/clients/:id': [
['middleware::api:Permission', { check: 'v1:openid:clients:delete' }],
'controller::OpenID.delete_client',
],
},
}
module.exports = exports = openid