| | |
| | | |
| | | return newEvent(SUCCESS_WITH_WARNINGS); |
| | | } |
| | | // ----------非单用户登录时显示提醒信息 Add by Tanbin END ------------ |
| | | |
| | | //-------- 单用户登录限制 Add by Tanbin ------- |
| | | // String singleLoginCheckbox = (String) context.getFlowScope().get("singleLoginCheckbox"); |
| | | // boolean kickOut = singleLoginService.singleLoginProperties.isKickOut(); |
| | | // if (singleLoginCheckbox != null) { |
| | | // kickOut = singleLoginCheckbox.equalsIgnoreCase("true"); |
| | | // } |
| | | // if(kickOut) { |
| | | // singleLoginService.kickOutOldLogins(tgt); |
| | | // } |
| | | //------------------------------------------ |
| | | } else { |
| | | tgt = this.centralAuthenticationService.getTicket(ticketGrantingTicket, TicketGrantingTicket.class); |
| | | tgt.getAuthentication().update(authentication); |
| | |
| | | return newEvent(SUCCESS_WITH_WARNINGS); |
| | | } |
| | | //验证通过统计在线人数存入map |
| | | if(!singleLoginService.set.contains(authenticationResult.getAuthentication().getPrincipal().toString())){ |
| | | singleLoginService.set.add(authenticationResult.getAuthentication().getPrincipal().toString() ); |
| | | if(!SingleLoginService.set.contains(authenticationResult.getAuthentication().getPrincipal().toString())){ |
| | | SingleLoginService.set.add(authenticationResult.getAuthentication().getPrincipal().toString() ); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | protected static Map<String, Object> buildEventAttributeMap(final Principal principal, final RegisteredService service, |
| | | final MultifactorAuthenticationProvider provider) { |
| | | final Map<String, Object> map = new HashMap<>(); |
| | | final Map<String, Object> map = new HashMap<>(5); |
| | | map.put(Principal.class.getName(), principal); |
| | | map.put(RegisteredService.class.getName(), service); |
| | | map.put(MultifactorAuthenticationProvider.class.getName(), provider); |