mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
校验token
This commit is contained in:
@@ -23,7 +23,7 @@ public class TokenValidateInterceptor implements RouteInterceptor {
|
|||||||
if (YesOrNoEnum.of(isNeedToken) == YesOrNoEnum.NO) {
|
if (YesOrNoEnum.of(isNeedToken) == YesOrNoEnum.NO) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 这里做校验token操作,如从redis查询token是否存在
|
|
||||||
// 走到这里token肯定有值
|
// 走到这里token肯定有值
|
||||||
String appAuthToken = context.getApiRequest().getAppAuthToken();
|
String appAuthToken = context.getApiRequest().getAppAuthToken();
|
||||||
|
|
||||||
@@ -41,7 +41,8 @@ public class TokenValidateInterceptor implements RouteInterceptor {
|
|||||||
* @return 返回true表示token合法,false不合法
|
* @return 返回true表示token合法,false不合法
|
||||||
*/
|
*/
|
||||||
protected boolean checkToken(String appAuthToken, ApiRequestContext context, ApiInfoDTO apiInfoDTO) {
|
protected boolean checkToken(String appAuthToken, ApiRequestContext context, ApiInfoDTO apiInfoDTO) {
|
||||||
// 完善token校验
|
// 这里做校验token操作,如从redis查询token是否存在
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user