IOT线 鉴权系统
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.

18 lines
788 B

3 years ago
'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);
3 years ago
app.fs.api.logAttr['DEL/oauth2/token/invalidate_all'] = { content: '删除所有访问令牌', visible: false };
router.delete('/oauth2/token/invalidate_all', OAuth.invalidateAll);
3 years ago
};