2020-08-13 06:56:33 +00:00
|
|
|
const openid = {
|
|
|
|
|
|
|
|
prefix: '/openid',
|
|
|
|
|
|
|
|
middleware: [
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
get: {
|
2021-04-15 18:50:48 +00:00
|
|
|
'/grant-and-save/:app_id/:uid': [
|
2021-04-15 18:41:13 +00:00
|
|
|
'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
|