/** * 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; }
/** * Information from the IDP SSO Descriptor * * @param idp * @return */ public static String toString(IDPSSODescriptorType idp) { StringBuilder builder = new StringBuilder(); builder.append(LINE_SEPARATOR); // Get the SSODescriptor tags SSODescriptorType sdt = idp; builder.append(toString(sdt)); List<EndpointType> ssoServices = idp.getSingleSignOnService(); if (ssoServices != null) { builder.append("Single Sign On Services are:["); for (EndpointType edt : ssoServices) { builder.append(toString(edt)); } builder.append("]"); builder.append(LINE_SEPARATOR); } return builder.toString(); }
/** * Information from the IDP SSO Descriptor * * @param idp * * @return */ public static String toString(IDPSSODescriptorType idp) { StringBuilder builder = new StringBuilder(); builder.append(LINE_SEPARATOR); // Get the SSODescriptor tags SSODescriptorType sdt = idp; builder.append(toString(sdt)); List<EndpointType> ssoServices = idp.getSingleSignOnService(); if (ssoServices != null) { builder.append("Single Sign On Services are:["); for (EndpointType edt : ssoServices) { builder.append(toString(edt)); } builder.append("]"); builder.append(LINE_SEPARATOR); } return builder.toString(); }
/** * Information from the IDP SSO Descriptor * @param idp * @return */ public static String toString(IDPSSODescriptorType idp) { StringBuilder builder = new StringBuilder(); builder.append(LINE_SEPARATOR); //Get the SSODescriptor tags SSODescriptorType sdt = idp; builder.append(toString(sdt)); List<EndpointType> ssoServices = idp.getSingleSignOnService(); if(ssoServices != null) { builder.append("Single Sign On Services are:["); for(EndpointType edt: ssoServices) { builder.append(toString(edt)); } builder.append("]"); builder.append(LINE_SEPARATOR); } return builder.toString(); }
/** * Information from the IDP SSO Descriptor * * @param idp * * @return */ public static String toString(IDPSSODescriptorType idp) { StringBuilder builder = new StringBuilder(); builder.append(LINE_SEPARATOR); // Get the SSODescriptor tags SSODescriptorType sdt = idp; builder.append(toString(sdt)); List<EndpointType> ssoServices = idp.getSingleSignOnService(); if (ssoServices != null) { builder.append("Single Sign On Services are:["); for (EndpointType edt : ssoServices) { builder.append(toString(edt)); } builder.append("]"); builder.append(LINE_SEPARATOR); } return builder.toString(); }
/** * 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 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; }
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; } }
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 new IllegalStateException(ErrorCodes.NULL_VALUE + "identity url"); } return idp; } }
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; } } List<KeyDescriptorType> keyDescriptors = idpssoDescriptorType.getKeyDescriptor(); if (keyDescriptors.size() > 0) { this.idpCertificate = MetaDataExtractor.getCertificate(keyDescriptors.get(0)); } this.idpMetadata = idpssoDescriptorType; } }
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; } } List<KeyDescriptorType> keyDescriptors = idpssoDescriptorType.getKeyDescriptor(); if (keyDescriptors.size() > 0) { this.idpCertificate = MetaDataExtractor.getCertificate(keyDescriptors.get(0)); } 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 new IllegalStateException(ErrorCodes.NULL_VALUE + "identity url"); } return idp; } }
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; } } List<KeyDescriptorType> keyDescriptors = idpssoDescriptorType.getKeyDescriptor(); if (keyDescriptors.size() > 0) { this.idpCertificate = MetaDataExtractor.getCertificate(keyDescriptors.get(0)); } this.idpMetadata = idpssoDescriptorType; } }
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; } } List<KeyDescriptorType> keyDescriptors = idpssoDescriptorType.getKeyDescriptor(); if (keyDescriptors.size() > 0) { this.idpCertificate = MetaDataExtractor.getCertificate(keyDescriptors.get(0)); } 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; }