Commit bce33775 authored by zhangyingbin's avatar zhangyingbin

修改权限认证规则

parent 43b7d227
...@@ -7,11 +7,10 @@ ...@@ -7,11 +7,10 @@
<artifactId>amos-boot-data</artifactId> <artifactId>amos-boot-data</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-data-accessapi</artifactId> <artifactId>amos-boot-data-accessapi</artifactId>
<version>1.0.0</version>
<name>amos-boot-data-accessapi</name> <name>amos-boot-data-accessapi</name>
<url>http://maven.apache.org</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
......
...@@ -56,13 +56,13 @@ public class ControllerAop { ...@@ -56,13 +56,13 @@ public class ControllerAop {
if (ValidationUtil.isEmpty(token)) { if (ValidationUtil.isEmpty(token)) {
token = request.getParameterMap().get("access_token")[0]; token = request.getParameterMap().get("access_token")[0];
} }
if (token != null) { // if (token != null) {
fillRequestContext(token); // fillRequestContext(token);
} // }
boolean validToken = TokenOperation.refresh(token); // boolean validToken = TokenOperation.refresh(token);
if(!validToken) { // if(!validToken) {
throw new AuthException("请求未包含认证信息."); // throw new AuthException("请求未包含认证信息.");
} // }
} }
......
...@@ -97,7 +97,7 @@ public class BusinessController { ...@@ -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) @RequestMapping(value = "/getData", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取map", notes = "获取map") @ApiOperation(httpMethod = "GET", value = "获取map", notes = "获取map")
@RestEventTrigger(value = "openapiLogEventHandler") @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