SimpleSAML_Configuration::getDefaultBinding PHP Method

getDefaultBinding() private method

This function combines the current metadata type (SAML 2 / SAML 1.1) with the endpoint type to determine which binding is the default.
private getDefaultBinding ( string $endpointType ) : string
$endpointType string The endpoint type.
return string The default binding.
    private function getDefaultBinding($endpointType)
    {
        assert('is_string($endpointType)');
        $set = $this->getString('metadata-set');
        switch ($set . ':' . $endpointType) {
            case 'saml20-idp-remote:SingleSignOnService':
            case 'saml20-idp-remote:SingleLogoutService':
            case 'saml20-sp-remote:SingleLogoutService':
                return \SAML2\Constants::BINDING_HTTP_REDIRECT;
            case 'saml20-sp-remote:AssertionConsumerService':
                return \SAML2\Constants::BINDING_HTTP_POST;
            case 'saml20-idp-remote:ArtifactResolutionService':
                return \SAML2\Constants::BINDING_SOAP;
            case 'shib13-idp-remote:SingleSignOnService':
                return 'urn:mace:shibboleth:1.0:profiles:AuthnRequest';
            case 'shib13-sp-remote:AssertionConsumerService':
                return 'urn:oasis:names:tc:SAML:1.0:profiles:browser-post';
            default:
                throw new Exception('Missing default binding for ' . $endpointType . ' in ' . $set);
        }
    }