| | |
| | | |
| | | } else if (e instanceof BadCredentialsException) { |
| | | // 密码错误 |
| | | logger.info("[登录失败] - 用户[{}]密码错误", username); |
| | | logger.info("[登录失败] - 用户[{}]密码/SIP服务器ID 错误", username); |
| | | |
| | | } else if (e instanceof CredentialsExpiredException) { |
| | | // 密码过期 |
| | |
| | | private Map<String, Date> timeSubscribes = new ConcurrentHashMap<>(); |
| | | |
| | | // @Scheduled(cron="*/5 * * * * ?") //每五秒执行一次 |
| | | @Scheduled(cron="0 * */1 * * ?") //每小时执行一次 |
| | | @Scheduled(cron="0 0 * * * ?") //每小时执行一次, 每个整点 |
| | | public void execute(){ |
| | | logger.info("[定时任务] 清理过期的订阅信息"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | // 注册失败
|
| | | response = getMessageFactory().createResponse(Response.FORBIDDEN, request);
|
| | | response.setReasonPhrase("wrong password");
|
| | | logger.info("[{}] 密码错误 回复403", requestAddress);
|
| | | logger.info("[{}] 密码/SIP服务器ID错误, 回复403", requestAddress);
|
| | | }else {
|
| | | // 携带授权头并且密码正确
|
| | | response = getMessageFactory().createResponse(Response.OK, request);
|