/** * Information from an endpoint * @param ept * @return */ public static String toString(EndpointType ept) { StringBuilder builder = new StringBuilder(); builder.append("[Location=").append(ept.getLocation()); builder.append(",ResponseLocation=").append(ept.getResponseLocation()); builder.append("]"); builder.append(LINE_SEPARATOR); return builder.toString(); } }
/** * Information from an endpoint * * @param ept * * @return */ public static String toString(EndpointType ept) { StringBuilder builder = new StringBuilder(); builder.append("[Location=").append(ept.getLocation()); builder.append(",ResponseLocation=").append(ept.getResponseLocation()); builder.append("]"); builder.append(LINE_SEPARATOR); return builder.toString(); } }
/** * Information from an endpoint * * @param ept * @return */ public static String toString(EndpointType ept) { StringBuilder builder = new StringBuilder(); builder.append("[Location=").append(ept.getLocation()); builder.append(",ResponseLocation=").append(ept.getResponseLocation()); builder.append("]"); builder.append(LINE_SEPARATOR); return builder.toString(); } }
/** * Given a binding uri, get the IDP logout response url (used for global logouts) */ public static String getLogoutResponseLocation(IDPSSODescriptorType idp, String bindingURI) { String logoutResponseLocation = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { if (endpoint.getResponseLocation() != null) { logoutResponseLocation = endpoint.getResponseLocation().toString(); } else { logoutResponseLocation = null; } break; } } return logoutResponseLocation; }
/** * Information from an endpoint * * @param ept * * @return */ public static String toString(EndpointType ept) { StringBuilder builder = new StringBuilder(); builder.append("[Location=").append(ept.getLocation()); builder.append(",ResponseLocation=").append(ept.getResponseLocation()); builder.append("]"); builder.append(LINE_SEPARATOR); return builder.toString(); } }
/** * Given a binding uri, get the IDP logout response url (used for global logouts) * */ public static String getLogoutResponseLocation(IDPSSODescriptorType idp, String bindingURI) { String logoutResponseLocation = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { if(endpoint.getResponseLocation() != null) { logoutResponseLocation = endpoint.getResponseLocation().toString(); } else { logoutResponseLocation = null; } break; } } return logoutResponseLocation; }
/** * Given a binding uri, get the IDP logout response url (used for global logouts) */ public static String getLogoutResponseLocation(IDPSSODescriptorType idp, String bindingURI) { String logoutResponseLocation = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { if (endpoint.getResponseLocation() != null) { logoutResponseLocation = endpoint.getResponseLocation().toString(); } else { logoutResponseLocation = null; } break; } } return logoutResponseLocation; }
public SamlService(SamlProfile profile, List<EndpointType> endpoints) { this.profile = profile; for (EndpointType endpoint : endpoints) { Binding binding = null; if (endpoint.getBinding().endsWith("HTTP-Redirect")) { binding = Binding.HTTP_Redirect; } else if (endpoint.getBinding().endsWith("HTTP-POST")) { binding = Binding.HTTP_Post; } else { // ignore other bindings } if (binding != null) { SamlEndpoint samlEndpoint = new SamlEndpoint(this, binding, endpoint.getLocation(), endpoint .getResponseLocation()); serviceEndpoints.add(samlEndpoint); } } }
private void writeEndpointType(EndpointType endpoint) throws ProcessingException { StaxUtil.writeAttribute(writer, JBossSAMLConstants.BINDING.get(), endpoint.getBinding().toString()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.LOCATION.get(), endpoint.getLocation().toString()); URI responseLocation = endpoint.getResponseLocation(); if (responseLocation != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.RESPONSE_LOCATION.get(), responseLocation.toString()); } }
private void writeEndpointType(EndpointType endpoint) throws ProcessingException { StaxUtil.writeAttribute(writer, JBossSAMLConstants.BINDING.get(), endpoint.getBinding().toString()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.LOCATION.get(), endpoint.getLocation().toString()); URI responseLocation = endpoint.getResponseLocation(); if (responseLocation != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.RESPONSE_LOCATION.get(), responseLocation.toString()); } }
private void writeEndpointType(EndpointType endpoint) throws ProcessingException { StaxUtil.writeAttribute(writer, JBossSAMLConstants.BINDING.get(), endpoint.getBinding().toString()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.LOCATION.get(), endpoint.getLocation().toString()); URI responseLocation = endpoint.getResponseLocation(); if (responseLocation != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.RESPONSE_LOCATION.get(), responseLocation.toString()); } }
private void writeEndpointType(EndpointType endpoint) throws ProcessingException { StaxUtil.writeAttribute(writer, JBossSAMLConstants.BINDING.get(), endpoint.getBinding().toString()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.LOCATION.get(), endpoint.getLocation().toString()); URI responseLocation = endpoint.getResponseLocation(); if (responseLocation != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.RESPONSE_LOCATION.get(), responseLocation.toString()); } }
private void writeEndpointType(EndpointType endpoint) throws ProcessingException { StaxUtil.writeAttribute(writer, JBossSAMLConstants.BINDING.get(), endpoint.getBinding().toString()); StaxUtil.writeAttribute(writer, JBossSAMLConstants.LOCATION.get(), endpoint.getLocation().toString()); URI responseLocation = endpoint.getResponseLocation(); if (responseLocation != null) { StaxUtil.writeAttribute(writer, JBossSAMLConstants.RESPONSE_LOCATION.get(), responseLocation.toString()); } }