@Test public void testLogoutUrlWithNoPath() throws Exception { context.checking(new Expectations() { { allowing(config).getServerUrl(); will(returnValue(SERVER_URL)); allowing(config).getServiceUrl(); will(returnValue(SERVICE_URL)); } }); assertThat(authenticator.logoutUrl(null), is(equalTo(SERVER_URL + "/logout"))); }
@Override public String logoutUrl(String path) { if (path != null && !path.startsWith("/")) { throw new IllegalArgumentException( "must specify an absolute path for an application resource"); } final StringBuilder url = new StringBuilder(); final String serverUrl = config.getServerUrl(); url.append(appendPathToUrl(serverUrl, LOGOUT_PATH)); if (path != null) { url.append("?url="); url.append(CommonUtils.urlEncode(applicationUrl(path))); } return url.toString(); }
JasigAuthenticator implements Authenticator, Serializable { @Override public String logoutUrl(String path) { if (path != null && !path.startsWith("/")) { throw new IllegalArgumentException( "must specify an absolute path for an application resource"); } final StringBuilder url = new StringBuilder(); final String serverUrl = config.getServerUrl(); url.append(appendPathToUrl(serverUrl, LOGOUT_PATH)); if (path != null) { url.append("?url="); url.append(CommonUtils.urlEncode(applicationUrl(path))); } return url.toString(); } }
JasigAuthenticator implements Authenticator, Serializable { @Override public String logoutUrl(String path) { if (path != null && !path.startsWith("/")) { throw new IllegalArgumentException( "must specify an absolute path for an application resource"); } final StringBuilder url = new StringBuilder(); final String serverUrl = config.getServerUrl(); url.append(appendPathToUrl(serverUrl, LOGOUT_PATH)); if (path != null) { url.append("?url="); url.append(CommonUtils.urlEncode(applicationUrl(path))); } return url.toString(); } JasigAuthenticator(Configuration config, TicketValidator validator); }
JasigAuthenticator implements Authenticator, Serializable { @Override public String logoutUrl(String path) { if (path != null && !path.startsWith("/")) { throw new IllegalArgumentException( "must specify an absolute path for an application resource"); } final StringBuilder url = new StringBuilder(); final String serverUrl = config.getServerUrl(); url.append(appendPathToUrl(serverUrl, LOGOUT_PATH)); if (path != null) { url.append("?url="); url.append(CommonUtils.urlEncode(applicationUrl(path))); } return url.toString(); } JasigAuthenticator(Configuration config, TicketValidator validator); @Override boolean isPostAuthRedirect(); @Override String loginUrl(String requestPath, String queryString); @Override String logoutUrl(String path); @Override IdentityAssertion validateTicket(String requestPath,
      String queryString); @Override String postAuthUrl(String requestUrl, String queryString); }
JasigAuthenticator implements Authenticator, Serializable { @Override public String logoutUrl(String path) { if (path != null && !path.startsWith("/")) { throw new IllegalArgumentException( "must specify an absolute path for an application resource"); } final StringBuilder url = new StringBuilder(); final String serverUrl = config.getServerUrl(); url.append(appendPathToUrl(serverUrl, LOGOUT_PATH)); if (path != null) { url.append("?url="); url.append(CommonUtils.urlEncode(applicationUrl(path))); } return url.toString(); } JasigAuthenticator(Configuration config, TicketValidator validator); @Override boolean isPostAuthRedirect(); @Override String loginUrl(String requestPath, String queryString); @Override String logoutUrl(String path); @Override IdentityAssertion validateTicket(String requestPath,
      String queryString); @Override String postAuthUrl(String requestUrl, String queryString); static final String LOGIN_PATH; static final String LOGOUT_PATH; }