private HttpResponse respond(LogoutResponse logoutResponse, SamlEndpoint sloResEndpoint) { if (sloResEndpoint.bindingProtocol() == SamlBindingProtocol.HTTP_REDIRECT) { return responseWithLocation(toRedirectionUrl( logoutResponse, sloResEndpoint.toUriString(), SAML_RESPONSE, signingCredential, signatureAlgorithm, null)); } else { final String value = toSignedBase64(logoutResponse, signingCredential, signatureAlgorithm); final HttpData body = getSsoForm(sloResEndpoint.toUriString(), SAML_RESPONSE, value, null); return HttpResponse.of(HttpStatus.OK, MediaType.HTML_UTF_8, body); } }
private AggregatedHttpMessage sendViaHttpPostBindingProtocol( String path, String paramName, SignableSAMLObject sinableObj) throws Exception { final String encoded = toSignedBase64(sinableObj, idpCredential, signatureAlgorithm); final QueryStringEncoder encoder = new QueryStringEncoder("/"); encoder.addParam(paramName, encoded); final HttpRequest req = HttpRequest.of(HttpMethod.POST, path, MediaType.FORM_DATA, encoder.toUri().getRawQuery()); return client.execute(req).aggregate().join(); }
relayState)); } else { final String value = toSignedBase64( arg.messageContext.getMessage(), signingCredential,
private HttpResponse respond(LogoutResponse logoutResponse, SamlEndpoint sloResEndpoint) { if (sloResEndpoint.bindingProtocol() == SamlBindingProtocol.HTTP_REDIRECT) { return responseWithLocation(toRedirectionUrl( logoutResponse, sloResEndpoint.toUriString(), SAML_RESPONSE, signingCredential, signatureAlgorithm, null)); } else { final String value = toSignedBase64(logoutResponse, signingCredential, signatureAlgorithm); final HttpData body = getSsoForm(sloResEndpoint.toUriString(), SAML_RESPONSE, value, null); return HttpResponse.of(HttpStatus.OK, MediaType.HTML_UTF_8, body); } }
relayState)); } else { final String value = toSignedBase64( arg.messageContext.getMessage(), signingCredential,