commit
d69e083f28
|
|
@ -45,6 +45,7 @@ public final class SingleSignOutFilter extends AbstractConfigurationFilter {
|
|||
handler.setArtifactParameterName(getPropertyFromInitParams(filterConfig, "artifactParameterName", "ticket"));
|
||||
handler.setLogoutParameterName(getPropertyFromInitParams(filterConfig, "logoutParameterName", "logoutRequest"));
|
||||
handler.setArtifactParameterOverPost(parseBoolean(getPropertyFromInitParams(filterConfig, "artifactParameterOverPost", "false")));
|
||||
handler.setEagerlyCreateSessions(parseBoolean(getPropertyFromInitParams(filterConfig, "eagerlyCreateSessions", "true")));
|
||||
}
|
||||
handler.init();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ public final class SingleSignOutHandler {
|
|||
|
||||
private boolean artifactParameterOverPost = false;
|
||||
|
||||
private boolean eagerlyCreateSessions = true;
|
||||
|
||||
private List<String> safeParameters;
|
||||
|
||||
|
||||
|
|
@ -83,6 +85,10 @@ public final class SingleSignOutHandler {
|
|||
this.logoutParameterName = name;
|
||||
}
|
||||
|
||||
public void setEagerlyCreateSessions(final boolean eagerlyCreateSessions) {
|
||||
this.eagerlyCreateSessions = eagerlyCreateSessions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the component for use.
|
||||
*/
|
||||
|
|
@ -128,7 +134,12 @@ public final class SingleSignOutHandler {
|
|||
* @param request HTTP request containing an authentication token.
|
||||
*/
|
||||
public void recordSession(final HttpServletRequest request) {
|
||||
final HttpSession session = request.getSession(true);
|
||||
final HttpSession session = request.getSession(this.eagerlyCreateSessions);
|
||||
|
||||
if (session == null) {
|
||||
log.debug("No session currently exists (and none created). Cannot record session information for single sign out.");
|
||||
return;
|
||||
}
|
||||
|
||||
final String token = CommonUtils.safeGetParameter(request, this.artifactParameterName, this.safeParameters);
|
||||
if (log.isDebugEnabled()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue