/** * Determines whether given SingleSignOn service can be used together with this profile. Bindings POST, Artifact * and Redirect are supported for WebSSO. * * @param endpoint endpoint * @return true if endpoint is supported * @throws MetadataProviderException in case system can't verify whether endpoint is supported or not */ @Override protected boolean isEndpointSupported(SingleSignOnService endpoint) throws MetadataProviderException { return SAML2_POST_BINDING_URI.equals(endpoint.getBinding()) || SAML2_REDIRECT_BINDING_URI.equals(endpoint.getBinding()); }
@Test public void bindingOrderSSOList() { IdentityZoneHolder.set(otherZone); IDPSSODescriptor idpSSODescriptor = generator.buildIDPSSODescriptor( generator.getEntityBaseURL(), generator.getEntityAlias(), false, Arrays.asList("email") ); assertEquals(SAML2_POST_BINDING_URI, idpSSODescriptor.getSingleSignOnServices().get(0).getBinding());; assertEquals(SAML2_REDIRECT_BINDING_URI, idpSSODescriptor.getSingleSignOnServices().get(1).getBinding());; }
/** * Determines whether given SingleSignOn service can be used together with this profile. Bindings POST, Artifact * and Redirect are supported for WebSSO. * * @param endpoint endpoint * @return true if endpoint is supported * @throws MetadataProviderException in case system can't verify whether endpoint is supported or not */ protected boolean isEndpointSupported(SingleSignOnService endpoint) throws MetadataProviderException { return org.opensaml.common.xml.SAMLConstants.SAML2_POST_BINDING_URI.equals(endpoint.getBinding()) || org.opensaml.common.xml.SAMLConstants.SAML2_ARTIFACT_BINDING_URI.equals(endpoint.getBinding()) || org.opensaml.common.xml.SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(endpoint.getBinding()); }
@Override protected boolean isEndpointSupported(SingleSignOnService endpoint) throws MetadataProviderException { // Only HoK endpoints are supported if (!SAMLConstants.SAML2_HOK_WEBSSO_PROFILE_URI.equals(endpoint.getBinding())) { return false; } String binding = SAMLUtil.getBindingForEndpoint(endpoint); return org.opensaml.common.xml.SAMLConstants.SAML2_POST_BINDING_URI.equals(binding) || org.opensaml.common.xml.SAMLConstants.SAML2_ARTIFACT_BINDING_URI.equals(binding) || org.opensaml.common.xml.SAMLConstants.SAML2_REDIRECT_BINDING_URI.equals(binding); }
if (idpDescriptor.getSingleSignOnServices() != null) { for (SingleSignOnService ssos : idpDescriptor.getSingleSignOnServices()) { if (ssos.getBinding().equals(SAMLConstants.SAML2_REDIRECT_BINDING_URI)) { idpMetadata.setSsoUrl(ssos.getLocation());
private static SingleSignOnService getIdpBinding( IDPSSODescriptor idpSsoDescriptor, SamlIdpBinding samlBinding) throws SamlException { return idpSsoDescriptor .getSingleSignOnServices() .stream() .filter( x -> x.getBinding() .equals("urn:oasis:names:tc:SAML:2.0:bindings:HTTP-" + samlBinding.toString())) .findAny() .orElseThrow(() -> new SamlException("Cannot find HTTP-POST SSO binding in metadata")); }
if (svc.getBinding().equals(SAMLConstants.SAML2_REDIRECT_BINDING_URI)) { _loginUrl = svc.getLocation(); break;
if (svc.getBinding().equals(SAMLConstants.SAML2_REDIRECT_BINDING_URI)) { loginUrl = svc.getLocation(); break;