| | |
| | | //先解密 |
| | | String decryptName = AesUtils.desEncrypt(username).trim(); |
| | | String decryptPwd = AesUtils.desEncrypt(password).trim(); |
| | | |
| | | log.error("user+++++++++"+decryptName+"+++++++++++"); |
| | | log.error("password+++++++++"+decryptPwd+"+++++++++++"); |
| | | UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(decryptName, decryptPwd); |
| | | writerToken(request, response, token, "用户名或密码错误"); |
| | | } |
| | |
| | | oAuth2Authentication.setAuthenticated(true); |
| | | ResponseUtil.responseSucceed(objectMapper, response, oAuth2AccessToken); |
| | | } catch (BadCredentialsException | InternalAuthenticationServiceException e) { |
| | | e.printStackTrace();//添加日志的打印功能 |
| | | e.printStackTrace(); |
| | | exceptionHandler(response, badCredenbtialsMsg); |
| | | } catch (Exception e) { |
| | | exceptionHandler(response, e); |