/**
  * 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());
 }
Пример #2
0
 public SingleSignOnService getSSO(EntityDescriptor entityDesc, String binding) {
   IDPSSODescriptor idpSsoDesc = entityDesc.getIDPSSODescriptor(SAMLConstants.SAML20P_NS);
   if (idpSsoDesc != null) {
     List<SingleSignOnService> ssos = idpSsoDesc.getSingleSignOnServices();
     for (SingleSignOnService sso : ssos) {
       if (sso.getBinding().equals(binding)) {
         return sso;
       }
     }
   }
   return null;
 }