/** * Given a binding uri, get the IDP identity url * * @param idp * @param bindingURI * @return */ public static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI) { String identityURL = null; List<EndpointType> endpoints = idp.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { identityURL = endpoint.getLocation().toString(); break; } } return identityURL; }
/** * Given a binding uri, get the IDP identity url * * @param idp * @param bindingURI * * @return */ public static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI) { String identityURL = null; List<EndpointType> endpoints = idp.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { identityURL = endpoint.getLocation().toString(); break; } } return identityURL; }
/** * Given a binding uri, get the IDP identity url * * @param idp * @param bindingURI * * @return */ public static String getLogoutURL(IDPSSODescriptorType idp, String bindingURI) { String logoutURL = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { logoutURL = endpoint.getLocation().toString(); break; } } return logoutURL; }
/** * Given a binding uri, get the IDP identity url * @param idp * @param bindingURI * @return */ public static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI) { String identityURL = null; List<EndpointType> endpoints = idp.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { identityURL = endpoint.getLocation().toString(); break; } } return identityURL; }
/** * Given a binding uri, get the IDP identity url * * @param idp * @param bindingURI * * @return */ public static String getLogoutURL(IDPSSODescriptorType idp, String bindingURI) { String logoutURL = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { logoutURL = endpoint.getLocation().toString(); break; } } return logoutURL; }
/** * Given a binding uri, get the IDP logout url * * @param idp * @param bindingURI * @return */ public static String getLogoutURL(IDPSSODescriptorType idp, String bindingURI) { String logoutURL = null; List<EndpointType> endpoints = idp.getSingleLogoutService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { logoutURL = endpoint.getLocation().toString(); break; } } return logoutURL; }
/** * Given a binding uri, get the IDP identity url * @param idp * @param bindingURI * @return */ public static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI) { String identityURL = null; List<EndpointType> endpoints = idp.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { identityURL = endpoint.getLocation().toString(); break; } } return identityURL; }
/** * Given a binding uri, get the IDP identity url * * @param idp * @param bindingURI * * @return */ public static String getIdentityURL(IDPSSODescriptorType idp, String bindingURI) { String identityURL = null; List<EndpointType> endpoints = idp.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(bindingURI)) { identityURL = endpoint.getLocation().toString(); break; } } return identityURL; }
/** * 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; }
/** * 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; }
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()); } }
private void processIdPMetadata(SPType spConfiguration) { IDPSSODescriptorType idpssoDescriptorType = null; if (isNotNull(spConfiguration.getIdpMetadataFile())) { idpssoDescriptorType = getIdpMetadataFromFile(spConfiguration); } else { idpssoDescriptorType = getIdpMetadataFromProvider(spConfiguration); } if (idpssoDescriptorType != null) { List<EndpointType> endpoints = idpssoDescriptorType.getSingleSignOnService(); for (EndpointType endpoint : endpoints) { String endpointBinding = endpoint.getBinding().toString(); if (endpointBinding.contains("HTTP-POST")) { endpointBinding = "POST"; } else if (endpointBinding.contains("HTTP-Redirect")) { endpointBinding = "REDIRECT"; } if (spConfiguration.getBindingType().equals(endpointBinding)) { spConfiguration.setIdentityURL(endpoint.getLocation().toString()); break; } } this.idpMetadata = idpssoDescriptorType; } }
/** * Get the IDP Type * * @param idpSSODescriptor * * @return */ public static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor) { IDPType idp = new IDPType(); List<EndpointType> endpoints = idpSSODescriptor.getSingleSignOnService(); if (endpoints != null) { for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get())) { idp.setIdentityURL(endpoint.getLocation().toString()); break; } } } if (StringUtil.isNullOrEmpty(idp.getIdentityURL())) { throw logger.nullValueError("identity url"); } return idp; }
/** * Get the IDP Type * * @param idpSSODescriptor * * @return */ public static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor) { IDPType idp = new IDPType(); List<EndpointType> endpoints = idpSSODescriptor.getSingleSignOnService(); if (endpoints != null) { for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get())) { idp.setIdentityURL(endpoint.getLocation().toString()); break; } } } if (StringUtil.isNullOrEmpty(idp.getIdentityURL())) { throw logger.nullValueError("identity url"); } return idp; }
/** * Get the IDP Type * * @param idpSSODescriptor * @return */ public static IDPType getIDPType(IDPSSODescriptorType idpSSODescriptor) { IDPType idp = new IDPType(); List<EndpointType> endpoints = idpSSODescriptor.getSingleSignOnService(); if (endpoints != null) { for (EndpointType endpoint : endpoints) { if (endpoint.getBinding().toString().equals(JBossSAMLURIConstants.SAML_HTTP_POST_BINDING.get())) { idp.setIdentityURL(endpoint.getLocation().toString()); break; } } } if (StringUtil.isNullOrEmpty(idp.getIdentityURL())) { throw logger.nullValueError("identity url"); } return idp; }