@Override public GeoServerWebAuthenticationDetails buildDetails(HttpServletRequest context) { return new GeoServerWebAuthenticationDetails(context); } }
/** A proper {@link GeoServerWebAuthenticationDetails} object must be present */ protected String retrieveUserName(Authentication authentication) { if (authentication.getDetails() instanceof GeoServerWebAuthenticationDetails) { String userGroupServiceName = ((GeoServerWebAuthenticationDetails) authentication.getDetails()) .getUserGroupServiceName(); if (userGroupServiceName == null || userGroupServiceName.trim().length() == 0) return ""; // no service specified --> no remember me return encode(super.retrieveUserName(authentication), userGroupServiceName); } else return ""; // no remember me feature without a user group service name };
.setUserGroupServiceName(userGroupServiceName);