add: 添加获取服务端KEY、生成加密URL、带用户标签的鉴权接口

This commit is contained in:
2020-08-07 18:41:40 +08:00
parent 15d7edbac9
commit 8fd17b13da
+4
View File
@@ -106,6 +106,7 @@ export class AppController {
@Get('/newAuthentication')
newAuthentication(@Req() req: Request): void {
console.log(req.url);
const { sign, t, userTag, path } = req.query;
// 校验参数完整性
@@ -114,6 +115,7 @@ export class AppController {
code: -1,
msg: '请求参数不完整',
});
console.log('请求参数不完整');
return;
}
@@ -124,6 +126,7 @@ export class AppController {
code: -1,
msg: '链接过期',
});
console.log('链接过期')
return;
}
@@ -142,6 +145,7 @@ export class AppController {
code: -1,
msg: '签名验证失败',
});
console.log('签名验证失败');
return;
}
req.res.status(HttpStatus.OK).json({