You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const OAuth = require('../../controllers/auth/app');
|
|
|
|
|
|
|
|
module.exports = function (app, router, opts) {
|
|
|
|
app.fs.api.logAttr['POST/oauth2/token'] = { content: '获取访问令牌', visible: true };
|
|
|
|
router.post('/oauth2/token', OAuth.apply);
|
|
|
|
|
|
|
|
app.fs.api.logAttr['POST/oauth2/token/refresh'] = { content: '刷新访问令牌', visible: false };
|
|
|
|
router.post('/oauth2/token/refresh', OAuth.refresh);
|
|
|
|
|
|
|
|
app.fs.api.logAttr['POST/oauth2/token/invalidate'] = { content: '作废访问令牌', visible: false };
|
|
|
|
router.post('/oauth2/token/invalidate', OAuth.invalidate);
|
|
|
|
|
|
|
|
app.fs.api.logAttr['DEL/oauth2/token/invalidate_all'] = { content: '删除所有访问令牌', visible: false };
|
|
|
|
router.delete('/oauth2/token/invalidate_all', OAuth.invalidateAll);
|
|
|
|
};
|