@Test public void testServiceUrlWithQueryContainingQueryWithProtocolSuffix() throws Exception { context.checking(commonConfigExpectations()); assertThat(authenticator.serviceUrl(REQUEST_PATH, "name=value&" + PROTOCOL.getTicketParameterName() + "=" + TICKET), is(equalTo(SERVICE_URL + REQUEST_PATH + "?name=value"))); }
String serviceUrl(String requestPath, String queryString) { URI uri = URI.create(config.getServiceUrl()); StringBuilder sb = new StringBuilder(); sb.append(uri.getScheme()); sb.append(": sb.append(uri.getAuthority()); sb.append(requestPath); queryString = QueryUtil.removeProtocolParameters(config.getProtocol(), queryString); if (!queryString.isEmpty()) { sb.append('?'); sb.append(queryString); } return sb.toString(); }
JasigAuthenticator implements Authenticator, Serializable { String serviceUrl(String requestPath, String queryString) { URI uri = URI.create(config.getServiceUrl()); StringBuilder sb = new StringBuilder(); sb.append(uri.getScheme()); sb.append(": sb.append(uri.getAuthority()); sb.append(requestPath); queryString = QueryUtil.removeProtocolParameters(config.getProtocol(), queryString); if (!queryString.isEmpty()) { sb.append('?'); sb.append(queryString); } return sb.toString(); } }
JasigAuthenticator implements Authenticator, Serializable { String serviceUrl(String requestPath, String queryString) { URI uri = URI.create(config.getServiceUrl()); StringBuilder sb = new StringBuilder(); sb.append(uri.getScheme()); sb.append(": sb.append(uri.getAuthority()); sb.append(requestPath); queryString = QueryUtil.removeProtocolParameters(config.getProtocol(), queryString); if (!queryString.isEmpty()) { sb.append('?'); sb.append(queryString); } return sb.toString(); } JasigAuthenticator(Configuration config, TicketValidator validator); }
JasigAuthenticator implements Authenticator, Serializable { String serviceUrl(String requestPath, String queryString) { URI uri = URI.create(config.getServiceUrl()); StringBuilder sb = new StringBuilder(); sb.append(uri.getScheme()); sb.append(": sb.append(uri.getAuthority()); sb.append(requestPath); queryString = QueryUtil.removeProtocolParameters(config.getProtocol(), queryString); if (!queryString.isEmpty()) { sb.append('?'); sb.append(queryString); } return sb.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 { String serviceUrl(String requestPath, String queryString) { URI uri = URI.create(config.getServiceUrl()); StringBuilder sb = new StringBuilder(); sb.append(uri.getScheme()); sb.append(": sb.append(uri.getAuthority()); sb.append(requestPath); queryString = QueryUtil.removeProtocolParameters(config.getProtocol(), queryString); if (!queryString.isEmpty()) { sb.append('?'); sb.append(queryString); } return sb.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; }