1
0
mirror of synced 2026-04-24 18:48:52 +08:00

♻️ 抽取 state 校验方法

This commit is contained in:
Yangkai.Shen
2019-08-02 14:19:42 +08:00
parent 909702e4da
commit bed01eef6d
2 changed files with 17 additions and 16 deletions

View File

@@ -66,15 +66,4 @@ public class AuthChecker {
throw new AuthException(AuthResponseStatus.ILLEGAL_CODE);
}
}
/**
* 校验回调传回的state
*
* @param state {@code state}一定不为空
*/
public static void checkState(String state) {
if (StringUtils.isEmpty(state) || !AuthStateCache.containsKey(state)) {
throw new AuthException(AuthResponseStatus.ILLEGAL_REQUEST);
}
}
}