Commit bce33775 authored by zhangyingbin's avatar zhangyingbin

修改权限认证规则

parent 43b7d227
......@@ -7,11 +7,10 @@
<artifactId>amos-boot-data</artifactId>
<version>1.0.0</version>
</parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-data-accessapi</artifactId>
<version>1.0.0</version>
<name>amos-boot-data-accessapi</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
......
......@@ -56,13 +56,13 @@ public class ControllerAop {
if (ValidationUtil.isEmpty(token)) {
token = request.getParameterMap().get("access_token")[0];
}
if (token != null) {
fillRequestContext(token);
}
boolean validToken = TokenOperation.refresh(token);
if(!validToken) {
throw new AuthException("请求未包含认证信息.");
}
// if (token != null) {
// fillRequestContext(token);
// }
// boolean validToken = TokenOperation.refresh(token);
// if(!validToken) {
// throw new AuthException("请求未包含认证信息.");
// }
}
......
......@@ -97,7 +97,7 @@ public class BusinessController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = true)
@RequestMapping(value = "/getData", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取map", notes = "获取map")
@RestEventTrigger(value = "openapiLogEventHandler")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment