| | |
| | | import com.kidgrow.authclient.util.AuthUtils; |
| | | import com.kidgrow.common.constant.SecurityConstants; |
| | | import com.kidgrow.common.context.ClientContextHolder; |
| | | import com.kidgrow.common.utils.AesUtils; |
| | | import com.kidgrow.common.utils.ResponseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public void getUserTokenInfo( |
| | | @ApiParam(required = true, name = "username", value = "账号") String username, |
| | | @ApiParam(required = true, name = "password", value = "密码") String password, |
| | | HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | | UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password); |
| | | HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | //先解密 |
| | | String decryptName = AesUtils.desEncrypt(username).trim(); |
| | | String decryptPwd = AesUtils.desEncrypt(password).trim(); |
| | | |
| | | UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(decryptName, decryptPwd); |
| | | writerToken(request, response, token, "用户名或密码错误"); |
| | | } |
| | | |