| | |
| | | package com.platform.verification; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.hx.redis.RedisUtil; |
| | | import com.hx.util.DateUtil; |
| | | import com.hx.util.StringUtils; |
| | | import com.hx.util.rsa.RSAUtil; |
| | |
| | | return PlatformResult.failure(PlatformCode.ERROR_APPIS, "APPID无效"); |
| | | } |
| | | |
| | | |
| | | if(StringUtils.isEmpty(thirtApplication.getPrivateKey())){ |
| | | return PlatformResult.failure(PlatformCode.ERROR_SIGN, "签名错误,APPID无效"); |
| | | } |
| | |
| | | return PlatformResult.failure(PlatformCode.ERROR_SIGN, "签名错误05"); |
| | | } |
| | | |
| | | //接口有效5秒钟 |
| | | if(System.currentTimeMillis()-date.getTime() > 5000){ |
| | | //接口有效30秒钟 |
| | | if(System.currentTimeMillis()-date.getTime() > 30000){ |
| | | return PlatformResult.failure(PlatformCode.ERRO_VISIT_OVERTIMR, "访问超时"); |
| | | } |
| | | |
| | | thirtApplication.setPrivateKey(null); |
| | | request.setAttribute(LoginConstant.LOGIN_APPLY,thirtApplication); |
| | | request.getSession().setAttribute(LoginConstant.LOGIN_APPLY,thirtApplication); |
| | | |
| | | return PlatformResult.success(); |
| | | } |