Rename logoutPath to logoutCallbackPath
This commit is contained in:
parent
af78b8703f
commit
1d4312b64f
|
|
@ -665,7 +665,7 @@ The `SingleSignOutFilter` can affect character encoding. This becomes most obvio
|
|||
| `relayStateParameterName` | Defaults to `RelayState` | No
|
||||
| `eagerlyCreateSessions` | Defaults to `true` | No
|
||||
| `artifactParameterOverPost` | Defaults to `false` | No
|
||||
| `logoutPath` | The path which is expected to receive logout callback requests from the CAS server. This is necessary if your app needs access to the raw input stream when handling form posts. If not configured, the default behavior will check every form post for a logout parameter. | No
|
||||
| `logoutCallbackPath` | The path which is expected to receive logout callback requests from the CAS server. This is necessary if your app needs access to the raw input stream when handling form posts. If not configured, the default behavior will check every form post for a logout parameter. | No
|
||||
| `casServerUrlPrefix` | URL to root of CAS Web application context. | Yes
|
||||
|
||||
<a name="cas-protocol"></a>
|
||||
|
|
|
|||
|
|
@ -78,5 +78,5 @@ public interface ConfigurationKeys {
|
|||
ConfigurationKey<Class<? extends Cas20ServiceTicketValidator>> TICKET_VALIDATOR_CLASS = new ConfigurationKey<Class<? extends Cas20ServiceTicketValidator>>("ticketValidatorClass", null);
|
||||
ConfigurationKey<String> PROXY_CALLBACK_URL = new ConfigurationKey<String>("proxyCallbackUrl", null);
|
||||
ConfigurationKey<String> RELAY_STATE_PARAMETER_NAME = new ConfigurationKey<String>("relayStateParameterName", "RelayState");
|
||||
ConfigurationKey<String> LOGOUT_PATH = new ConfigurationKey<String>("logoutPath", null);
|
||||
ConfigurationKey<String> LOGOUT_CALLBACK_PATH = new ConfigurationKey<String>("logoutCallbackPath", null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public final class SingleSignOutFilter extends AbstractConfigurationFilter {
|
|||
setLogoutParameterName(getString(ConfigurationKeys.LOGOUT_PARAMETER_NAME));
|
||||
setRelayStateParameterName(getString(ConfigurationKeys.RELAY_STATE_PARAMETER_NAME));
|
||||
setCasServerUrlPrefix(getString(ConfigurationKeys.CAS_SERVER_URL_PREFIX));
|
||||
setLogoutPath(getString(ConfigurationKeys.LOGOUT_PATH));
|
||||
setLogoutCallbackPath(getString(ConfigurationKeys.LOGOUT_CALLBACK_PATH));
|
||||
HANDLER.setArtifactParameterOverPost(getBoolean(ConfigurationKeys.ARTIFACT_PARAMETER_OVER_POST));
|
||||
HANDLER.setEagerlyCreateSessions(getBoolean(ConfigurationKeys.EAGERLY_CREATE_SESSIONS));
|
||||
}
|
||||
|
|
@ -72,8 +72,8 @@ public final class SingleSignOutFilter extends AbstractConfigurationFilter {
|
|||
HANDLER.setCasServerUrlPrefix(casServerUrlPrefix);
|
||||
}
|
||||
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
HANDLER.setLogoutPath(logoutPath);
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
HANDLER.setLogoutCallbackPath(logoutCallbackPath);
|
||||
}
|
||||
|
||||
public void setSessionMappingStorage(final SessionMappingStorage storage) {
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public final class SingleSignOutHandler {
|
|||
/** The prefix url of the CAS server */
|
||||
private String casServerUrlPrefix = "";
|
||||
|
||||
/** The logout path configured at the CAS server, if there is one */
|
||||
private String logoutPath;
|
||||
/** The logout callback path configured at the CAS server, if there is one */
|
||||
private String logoutCallbackPath;
|
||||
|
||||
private boolean artifactParameterOverPost = false;
|
||||
|
||||
|
|
@ -111,10 +111,10 @@ public final class SingleSignOutHandler {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param logoutPath The logout path configured at the CAS server.
|
||||
* @param logoutCallbackPath The logout callback path configured at the CAS server.
|
||||
*/
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
this.logoutPath = logoutPath;
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
this.logoutCallbackPath = logoutCallbackPath;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -185,7 +185,7 @@ public final class SingleSignOutHandler {
|
|||
}
|
||||
|
||||
private boolean pathEligibleForLogout(HttpServletRequest request) {
|
||||
return logoutPath == null || logoutPath.equals(getPath(request));
|
||||
return logoutCallbackPath == null || logoutCallbackPath.equals(getPath(request));
|
||||
}
|
||||
|
||||
private String getPath(HttpServletRequest request) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public final class SingleSignOutHandlerTests {
|
|||
|
||||
@Test
|
||||
public void backChannelLogoutDoesNotRunIfPathIsNotEligibleForLogout() {
|
||||
handler.setLogoutPath("/logout");
|
||||
handler.setLogoutCallbackPath("/logout");
|
||||
request.setServletPath("/not-a-logout");
|
||||
final MockHttpSession session = doBackChannelLogout();
|
||||
assertTrue(handler.process(request, response));
|
||||
|
|
@ -132,7 +132,7 @@ public final class SingleSignOutHandlerTests {
|
|||
|
||||
@Test
|
||||
public void backChannelLogoutRunsIfPathEqualsLogoutPath() {
|
||||
handler.setLogoutPath("/logout");
|
||||
handler.setLogoutCallbackPath("/logout");
|
||||
request.setServletPath("/logout");
|
||||
final MockHttpSession session = doBackChannelLogout();
|
||||
assertFalse(handler.process(request, response));
|
||||
|
|
|
|||
|
|
@ -60,8 +60,8 @@ public class SingleSignOutValve extends AbstractLifecycleValve implements Sessio
|
|||
this.handler.setCasServerUrlPrefix(casServerUrlPrefix);
|
||||
}
|
||||
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
this.handler.setLogoutPath(logoutPath);
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
this.handler.setLogoutCallbackPath(logoutCallbackPath);
|
||||
}
|
||||
|
||||
public void setSessionMappingStorage(final SessionMappingStorage storage) {
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public class SingleSignOutValve extends ValveBase implements SessionListener {
|
|||
this.handler.setCasServerUrlPrefix(casServerUrlPrefix);
|
||||
}
|
||||
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
this.handler.setLogoutPath(logoutPath);
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
this.handler.setLogoutCallbackPath(logoutCallbackPath);
|
||||
}
|
||||
|
||||
public void setSessionMappingStorage(final SessionMappingStorage storage) {
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public class SingleSignOutValve extends ValveBase implements SessionListener {
|
|||
this.handler.setCasServerUrlPrefix(casServerUrlPrefix);
|
||||
}
|
||||
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
this.handler.setLogoutPath(logoutPath);
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
this.handler.setLogoutCallbackPath(logoutCallbackPath);
|
||||
}
|
||||
|
||||
public void setSessionMappingStorage(final SessionMappingStorage storage) {
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ public class SingleSignOutValve extends ValveBase implements SessionListener {
|
|||
this.handler.setCasServerUrlPrefix(casServerUrlPrefix);
|
||||
}
|
||||
|
||||
public void setLogoutPath(String logoutPath) {
|
||||
this.handler.setLogoutPath(logoutPath);
|
||||
public void setLogoutCallbackPath(String logoutCallbackPath) {
|
||||
this.handler.setLogoutCallbackPath(logoutCallbackPath);
|
||||
}
|
||||
|
||||
public void setSessionMappingStorage(final SessionMappingStorage storage) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue