Skip to content

Commit

Permalink
remove useless logs
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrain2012 committed Nov 2, 2020
1 parent db0c09c commit 958078e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/main/java/cn/wildfirechat/app/AppController.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public Object loginWithSession(@PathVariable("token") String token) {
try {
int i = 0;
while (i < timeoutSecond) {
LOG.info("Check session {} status. time is {}", token, i);
RestResult restResult = mService.loginWithSession(token);
if (restResult.getCode() == RestResult.RestCode.ERROR_SESSION_NOT_VERIFIED.code && restResult.getResult() != null) {
deferredResult.setResult(new ResponseEntity(restResult, HttpStatus.OK));
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/cn/wildfirechat/app/ServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,12 @@ public RestResult createPcSession(CreateSessionRequest request) {

@Override
public RestResult loginWithSession(String token) {
LOG.info("loginWithSession token is {}", token);

Subject subject = SecurityUtils.getSubject();
// 在认证提交前准备 token(令牌)
// comment start 如果确定登录不成功,就不通过Shiro尝试登录了
TokenAuthenticationToken tt = new TokenAuthenticationToken(token);
PCSession session = authDataSource.getSession(token, false);

if (session == null) {
LOG.info("Session {} not exist", token);
} else {
LOG.info("Session {} status is {}, and clientId is {}", token, session.getStatus(), session.getClientId());
}

if (session == null) {
return RestResult.error(ERROR_CODE_EXPIRED);
} else if (session.getStatus() == Session_Created) {
Expand Down

0 comments on commit 958078e

Please sign in to comment.