From 908410e313e409700757469e26d37a6fdc331b47 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Thu, 15 Dec 2016 17:53:27 +0100 Subject: [PATCH 01/17] improved doc --- README.md | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1f4970e..dbe3704 100644 --- a/README.md +++ b/README.md @@ -33,17 +33,10 @@ Installation The recommended way to install goetas-webservices / soap-client is using [Composer](https://getcomposer.org/): -Add this packages to your `composer.json` file. ``` -{ - "require": { - "goetas-webservices/soap-client": "^0.2", - }, - "require-dev": { - "goetas-webservices/wsdl2php": "^0.3", - }, -} +composer require goetas-webservices/soap-client +composer require goetas-webservices/wsdl2php --dev ``` More dependencies might be needed depending on your PSR-7 and HTTP client preferred implementation. @@ -65,7 +58,7 @@ Here is an example: # config.yml soap_client: - alternative_endpoints: + alternative_endpoints: # optional MyServiceName: MySoapPortName: http://localhost:8080/service @@ -75,7 +68,7 @@ soap_client: 'TestNs/MyApp': soap/src destinations_jms: 'TestNs/MyApp': soap/metadata - aliases: + aliases: # optional 'http://www.example.org/test/': MyCustomXSDType: 'MyCustomMappedPHPType' From defbc57f8d083e841cde0923e3865caa47239d70 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Fri, 16 Dec 2016 13:42:14 +0100 Subject: [PATCH 02/17] added support for WSS Security --- .../Headers/Handler/HeaderHandler.php | 1 - .../Secext.AttributedStringType.yml | 19 ++ .../Secext.BinarySecurityToken.yml | 3 + .../Secext.BinarySecurityTokenType.yml | 11 + .../wss-ws-security/Secext.Embedded.yml | 3 + .../wss-ws-security/Secext.EmbeddedType.yml | 15 + .../Secext.EncodedStringType.yml | 11 + .../wss-ws-security/Secext.KeyIdentifier.yml | 3 + .../Secext.KeyIdentifierType.yml | 11 + .../metadata/wss-ws-security/Secext.Nonce.yml | 3 + .../wss-ws-security/Secext.Password.yml | 3 + .../Secext.PasswordStringType.yml | 11 + .../wss-ws-security/Secext.Reference.yml | 3 + .../wss-ws-security/Secext.ReferenceType.yml | 22 ++ .../wss-ws-security/Secext.Security.yml | 3 + .../Secext.SecurityHeaderType.yml | 6 + .../Secext.SecurityTokenReference.yml | 3 + .../Secext.SecurityTokenReferenceType.yml | 28 ++ .../Secext.TransformationParameters.yml | 3 + .../Secext.TransformationParametersType.yml | 6 + .../wss-ws-security/Secext.UsernameToken.yml | 3 + .../Secext.UsernameTokenType.yml | 25 ++ .../Utility.AttributedDateTimeType.yml | 19 ++ .../Utility.AttributedURIType.yml | 19 ++ .../wss-ws-security/Utility.Created.yml | 3 + .../wss-ws-security/Utility.Expires.yml | 3 + .../wss-ws-security/Utility.Timestamp.yml | 3 + .../wss-ws-security/Utility.TimestampType.yml | 33 ++ .../XmlSign.CanonicalizationMethod.yml | 3 + .../XmlSign.CanonicalizationMethodType.yml | 13 + .../wss-ws-security/XmlSign.DSAKeyValue.yml | 3 + .../XmlSign.DSAKeyValueType.yml | 72 ++++ .../wss-ws-security/XmlSign.DigestMethod.yml | 3 + .../XmlSign.DigestMethodType.yml | 13 + .../wss-ws-security/XmlSign.DigestValue.yml | 12 + .../wss-ws-security/XmlSign.KeyInfo.yml | 3 + .../wss-ws-security/XmlSign.KeyInfoType.yml | 111 ++++++ .../wss-ws-security/XmlSign.KeyName.yml | 12 + .../wss-ws-security/XmlSign.KeyValue.yml | 3 + .../wss-ws-security/XmlSign.KeyValueType.yml | 24 ++ .../wss-ws-security/XmlSign.Manifest.yml | 3 + .../wss-ws-security/XmlSign.ManifestType.yml | 25 ++ .../wss-ws-security/XmlSign.MgmtData.yml | 12 + .../wss-ws-security/XmlSign.ObjectType.yml | 31 ++ .../wss-ws-security/XmlSign.ObjectXsd.yml | 3 + .../wss-ws-security/XmlSign.PGPData.yml | 3 + .../wss-ws-security/XmlSign.PGPDataType.yml | 24 ++ .../wss-ws-security/XmlSign.RSAKeyValue.yml | 3 + .../XmlSign.RSAKeyValueType.yml | 22 ++ .../wss-ws-security/XmlSign.Reference.yml | 3 + .../wss-ws-security/XmlSign.ReferenceType.yml | 63 ++++ .../XmlSign.RetrievalMethod.yml | 3 + .../XmlSign.RetrievalMethodType.yml | 34 ++ .../wss-ws-security/XmlSign.SPKIData.yml | 3 + .../wss-ws-security/XmlSign.SPKIDataType.yml | 18 + .../wss-ws-security/XmlSign.Signature.yml | 3 + .../XmlSign.SignatureMethod.yml | 3 + .../XmlSign.SignatureMethodType.yml | 23 ++ .../XmlSign.SignatureProperties.yml | 3 + .../XmlSign.SignaturePropertiesType.yml | 25 ++ .../XmlSign.SignatureProperty.yml | 3 + .../XmlSign.SignaturePropertyType.yml | 22 ++ .../wss-ws-security/XmlSign.SignatureType.yml | 55 +++ .../XmlSign.SignatureValue.yml | 3 + .../XmlSign.SignatureValueType.yml | 19 ++ .../wss-ws-security/XmlSign.SignedInfo.yml | 3 + .../XmlSign.SignedInfoType.yml | 45 +++ .../wss-ws-security/XmlSign.Transform.yml | 3 + .../wss-ws-security/XmlSign.TransformType.yml | 27 ++ .../wss-ws-security/XmlSign.Transforms.yml | 3 + .../XmlSign.TransformsType.yml | 16 + .../wss-ws-security/XmlSign.X509Data.yml | 3 + .../wss-ws-security/XmlSign.X509DataType.yml | 74 ++++ .../XmlSign.X509IssuerSerialType.yml | 22 ++ src/WssWsSecurity/Security.php | 150 +++++++++ .../WssSecurityHeaderEventHandler.php | 70 ++++ .../WssSecurityHeaderHandler.php | 107 ++++++ tests/Serializer/WssSecurityTest.php | 73 ++++ ws-security/config.yml | 16 + ...oasis-200401-wss-wssecurity-secext-1.0.xsd | 195 +++++++++++ ...asis-200401-wss-wssecurity-utility-1.0.xsd | 108 ++++++ ws-security/xmldsig-core-schema.xsd | 318 ++++++++++++++++++ 82 files changed, 2189 insertions(+), 1 deletion(-) create mode 100644 src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.Embedded.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.Nonce.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.Password.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.Reference.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.Security.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml create mode 100644 src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.Created.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.Expires.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml create mode 100644 src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml create mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml create mode 100644 src/WssWsSecurity/Security.php create mode 100644 src/WssWsSecurity/WssSecurityHeaderEventHandler.php create mode 100644 src/WssWsSecurity/WssSecurityHeaderHandler.php create mode 100644 tests/Serializer/WssSecurityTest.php create mode 100644 ws-security/config.yml create mode 100644 ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd create mode 100644 ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd create mode 100644 ws-security/xmldsig-core-schema.xsd diff --git a/src/Arguments/Headers/Handler/HeaderHandler.php b/src/Arguments/Headers/Handler/HeaderHandler.php index 72d3efa..10d1e63 100644 --- a/src/Arguments/Headers/Handler/HeaderHandler.php +++ b/src/Arguments/Headers/Handler/HeaderHandler.php @@ -9,7 +9,6 @@ use JMS\Serializer\SerializationContext; use JMS\Serializer\XmlDeserializationVisitor; use JMS\Serializer\XmlSerializationVisitor; -use Symfony\Component\DependencyInjection\SimpleXMLElement; class HeaderHandler implements SubscribingHandlerInterface { diff --git a/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml new file mode 100644 index 0000000..73be395 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml @@ -0,0 +1,19 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType: + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: string + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml new file mode 100644 index 0000000..5492b45 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\BinarySecurityToken: + xml_root_name: BinarySecurityToken + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml new file mode 100644 index 0000000..2bff300 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml @@ -0,0 +1,11 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\BinarySecurityTokenType: + properties: + valueType: + expose: true + access_type: public_method + serialized_name: ValueType + accessor: + getter: getValueType + setter: setValueType + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml b/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml new file mode 100644 index 0000000..3049c53 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Embedded: + xml_root_name: Embedded + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml b/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml new file mode 100644 index 0000000..a39bd45 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml @@ -0,0 +1,15 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\EmbeddedType: + properties: + valueType: + expose: true + access_type: public_method + serialized_name: ValueType + accessor: + getter: getValueType + setter: setValueType + xml_attribute: true + type: string + anyAttribute: + exclude: true + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml new file mode 100644 index 0000000..a72610b --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml @@ -0,0 +1,11 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\EncodedStringType: + properties: + encodingType: + expose: true + access_type: public_method + serialized_name: EncodingType + accessor: + getter: getEncodingType + setter: setEncodingType + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml new file mode 100644 index 0000000..f96999a --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\KeyIdentifier: + xml_root_name: KeyIdentifier + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml new file mode 100644 index 0000000..fd71202 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml @@ -0,0 +1,11 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\KeyIdentifierType: + properties: + valueType: + expose: true + access_type: public_method + serialized_name: ValueType + accessor: + getter: getValueType + setter: setValueType + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml b/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml new file mode 100644 index 0000000..220dd32 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Nonce: + xml_root_name: Nonce + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.Password.yml b/src/Resources/metadata/wss-ws-security/Secext.Password.yml new file mode 100644 index 0000000..faf00a2 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.Password.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Password: + xml_root_name: Password + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml new file mode 100644 index 0000000..3fb9dec --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml @@ -0,0 +1,11 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\PasswordStringType: + properties: + type: + expose: true + access_type: public_method + serialized_name: Type + accessor: + getter: getType + setter: setType + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Reference.yml b/src/Resources/metadata/wss-ws-security/Secext.Reference.yml new file mode 100644 index 0000000..a1dcdc1 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.Reference.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Reference: + xml_root_name: Reference + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml b/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml new file mode 100644 index 0000000..3d9f29d --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml @@ -0,0 +1,22 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\ReferenceType: + properties: + uRI: + expose: true + access_type: public_method + serialized_name: URI + accessor: + getter: getURI + setter: setURI + xml_attribute: true + type: string + valueType: + expose: true + access_type: public_method + serialized_name: ValueType + accessor: + getter: getValueType + setter: setValueType + xml_attribute: true + type: string + anyAttribute: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.Security.yml b/src/Resources/metadata/wss-ws-security/Secext.Security.yml new file mode 100644 index 0000000..b50cb57 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.Security.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Security: + xml_root_name: Security + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml new file mode 100644 index 0000000..8fe8118 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml @@ -0,0 +1,6 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityHeaderType: + properties: + anyAttribute: + exclude: true + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml new file mode 100644 index 0000000..0f64d28 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityTokenReference: + xml_root_name: SecurityTokenReference + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml new file mode 100644 index 0000000..4b9c823 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml @@ -0,0 +1,28 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityTokenReferenceType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + usage: + expose: true + access_type: public_method + serialized_name: Usage + accessor: + getter: getUsage + setter: setUsage + xml_attribute: true + type: GoetasWebservices\Xsd\XsdToPhp\Jms\SimpleListOf + xml_list: + inline: false + entry_name: anyURI + entry_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' + anyAttribute: + exclude: true + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml b/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml new file mode 100644 index 0000000..670f37c --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\TransformationParameters: + xml_root_name: TransformationParameters + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml b/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml new file mode 100644 index 0000000..8f2f81f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml @@ -0,0 +1,6 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\TransformationParametersType: + properties: + anyAttribute: + exclude: true + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml b/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml new file mode 100644 index 0000000..3825e6f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\UsernameToken: + xml_root_name: UsernameToken + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml b/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml new file mode 100644 index 0000000..23fe0e5 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml @@ -0,0 +1,25 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\UsernameTokenType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + anyAttribute: + exclude: true + username: + expose: true + access_type: public_method + serialized_name: Username + xml_element: + namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' + accessor: + getter: getUsername + setter: setUsername + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml b/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml new file mode 100644 index 0000000..a63bcb4 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml @@ -0,0 +1,19 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\AttributedDateTimeType: + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: string + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml b/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml new file mode 100644 index 0000000..4ca214e --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml @@ -0,0 +1,19 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\AttributedURIType: + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: string + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/Utility.Created.yml b/src/Resources/metadata/wss-ws-security/Utility.Created.yml new file mode 100644 index 0000000..212e0e8 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.Created.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created: + xml_root_name: Created + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.Expires.yml b/src/Resources/metadata/wss-ws-security/Utility.Expires.yml new file mode 100644 index 0000000..5314160 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.Expires.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires: + xml_root_name: Expires + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml b/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml new file mode 100644 index 0000000..f9757f6 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Timestamp: + xml_root_name: Timestamp + xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml b/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml new file mode 100644 index 0000000..ab2b1a7 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml @@ -0,0 +1,33 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\TimestampType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + created: + expose: true + access_type: public_method + serialized_name: Created + xml_element: + namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' + accessor: + getter: getCreated + setter: setCreated + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created + expires: + expose: true + access_type: public_method + serialized_name: Expires + xml_element: + namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' + accessor: + getter: getExpires + setter: setExpires + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml new file mode 100644 index 0000000..52b1706 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod: + xml_root_name: CanonicalizationMethod + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml new file mode 100644 index 0000000..6992ab7 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml @@ -0,0 +1,13 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethodType: + properties: + algorithm: + expose: true + access_type: public_method + serialized_name: Algorithm + accessor: + getter: getAlgorithm + setter: setAlgorithm + xml_attribute: true + type: string + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml new file mode 100644 index 0000000..3a05ce5 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue: + xml_root_name: DSAKeyValue + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml new file mode 100644 index 0000000..28b01ab --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml @@ -0,0 +1,72 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValueType: + properties: + p: + expose: true + access_type: public_method + serialized_name: P + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getP + setter: setP + type: \AnySimpleType + q: + expose: true + access_type: public_method + serialized_name: Q + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getQ + setter: setQ + type: \AnySimpleType + g: + expose: true + access_type: public_method + serialized_name: G + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getG + setter: setG + type: \AnySimpleType + y: + expose: true + access_type: public_method + serialized_name: Y + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getY + setter: setY + type: \AnySimpleType + j: + expose: true + access_type: public_method + serialized_name: J + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getJ + setter: setJ + type: \AnySimpleType + seed: + expose: true + access_type: public_method + serialized_name: Seed + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSeed + setter: setSeed + type: \AnySimpleType + pgenCounter: + expose: true + access_type: public_method + serialized_name: PgenCounter + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getPgenCounter + setter: setPgenCounter + type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml new file mode 100644 index 0000000..f2e1a5a --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod: + xml_root_name: DigestMethod + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml new file mode 100644 index 0000000..116dc0f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml @@ -0,0 +1,13 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethodType: + properties: + algorithm: + expose: true + access_type: public_method + serialized_name: Algorithm + accessor: + getter: getAlgorithm + setter: setAlgorithm + xml_attribute: true + type: string + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml new file mode 100644 index 0000000..51b2205 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml @@ -0,0 +1,12 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestValue: + xml_root_name: DigestValue + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml new file mode 100644 index 0000000..4dc109f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo: + xml_root_name: KeyInfo + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml new file mode 100644 index 0000000..ea8794c --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml @@ -0,0 +1,111 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfoType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + keyName: + expose: true + access_type: public_method + serialized_name: KeyName + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getKeyName + setter: setKeyName + xml_list: + inline: true + entry_name: KeyName + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + keyValue: + expose: true + access_type: public_method + serialized_name: KeyValue + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getKeyValue + setter: setKeyValue + xml_list: + inline: true + entry_name: KeyValue + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + retrievalMethod: + expose: true + access_type: public_method + serialized_name: RetrievalMethod + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getRetrievalMethod + setter: setRetrievalMethod + xml_list: + inline: true + entry_name: RetrievalMethod + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + x509Data: + expose: true + access_type: public_method + serialized_name: X509Data + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509Data + setter: setX509Data + xml_list: + inline: true + entry_name: X509Data + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + pGPData: + expose: true + access_type: public_method + serialized_name: PGPData + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getPGPData + setter: setPGPData + xml_list: + inline: true + entry_name: PGPData + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + sPKIData: + expose: true + access_type: public_method + serialized_name: SPKIData + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSPKIData + setter: setSPKIData + type: array<\AnySimpleType> + xml_list: + inline: false + entry_name: SPKISexp + namespace: 'http://www.w3.org/2000/09/xmldsig#' + mgmtData: + expose: true + access_type: public_method + serialized_name: MgmtData + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getMgmtData + setter: setMgmtData + xml_list: + inline: true + entry_name: MgmtData + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml new file mode 100644 index 0000000..3ad9bb6 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml @@ -0,0 +1,12 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyName: + xml_root_name: KeyName + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml new file mode 100644 index 0000000..d468522 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue: + xml_root_name: KeyValue + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml new file mode 100644 index 0000000..48fc815 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml @@ -0,0 +1,24 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValueType: + properties: + dSAKeyValue: + expose: true + access_type: public_method + serialized_name: DSAKeyValue + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getDSAKeyValue + setter: setDSAKeyValue + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue + rSAKeyValue: + expose: true + access_type: public_method + serialized_name: RSAKeyValue + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getRSAKeyValue + setter: setRSAKeyValue + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml new file mode 100644 index 0000000..3944649 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Manifest: + xml_root_name: Manifest + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml new file mode 100644 index 0000000..d443342 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml @@ -0,0 +1,25 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ManifestType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + reference: + expose: true + access_type: public_method + serialized_name: Reference + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getReference + setter: setReference + xml_list: + inline: true + entry_name: Reference + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml new file mode 100644 index 0000000..dda9682 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml @@ -0,0 +1,12 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\MgmtData: + xml_root_name: MgmtData + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml new file mode 100644 index 0000000..9cb53c3 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml @@ -0,0 +1,31 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + mimeType: + expose: true + access_type: public_method + serialized_name: MimeType + accessor: + getter: getMimeType + setter: setMimeType + xml_attribute: true + type: string + encoding: + expose: true + access_type: public_method + serialized_name: Encoding + accessor: + getter: getEncoding + setter: setEncoding + xml_attribute: true + type: string + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml new file mode 100644 index 0000000..b3c9341 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd: + xml_root_name: Object + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml new file mode 100644 index 0000000..c745f87 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData: + xml_root_name: PGPData + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml new file mode 100644 index 0000000..483a0a8 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml @@ -0,0 +1,24 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPDataType: + properties: + pGPKeyID: + expose: true + access_type: public_method + serialized_name: PGPKeyID + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getPGPKeyID + setter: setPGPKeyID + type: \AnySimpleType + pGPKeyPacket: + expose: true + access_type: public_method + serialized_name: PGPKeyPacket + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getPGPKeyPacket + setter: setPGPKeyPacket + type: \AnySimpleType + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml new file mode 100644 index 0000000..a0779f4 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue: + xml_root_name: RSAKeyValue + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml new file mode 100644 index 0000000..dbd5050 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml @@ -0,0 +1,22 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValueType: + properties: + modulus: + expose: true + access_type: public_method + serialized_name: Modulus + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getModulus + setter: setModulus + type: \AnySimpleType + exponent: + expose: true + access_type: public_method + serialized_name: Exponent + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getExponent + setter: setExponent + type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml new file mode 100644 index 0000000..b4aee42 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference: + xml_root_name: Reference + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml new file mode 100644 index 0000000..75bfedb --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml @@ -0,0 +1,63 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ReferenceType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + uRI: + expose: true + access_type: public_method + serialized_name: URI + accessor: + getter: getURI + setter: setURI + xml_attribute: true + type: string + type: + expose: true + access_type: public_method + serialized_name: Type + accessor: + getter: getType + setter: setType + xml_attribute: true + type: string + transforms: + expose: true + access_type: public_method + serialized_name: Transforms + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getTransforms + setter: setTransforms + type: array + xml_list: + inline: false + entry_name: Transform + namespace: 'http://www.w3.org/2000/09/xmldsig#' + digestMethod: + expose: true + access_type: public_method + serialized_name: DigestMethod + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getDigestMethod + setter: setDigestMethod + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod + digestValue: + expose: true + access_type: public_method + serialized_name: DigestValue + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getDigestValue + setter: setDigestValue + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestValue diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml new file mode 100644 index 0000000..0f91225 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod: + xml_root_name: RetrievalMethod + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml new file mode 100644 index 0000000..2af0c76 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml @@ -0,0 +1,34 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethodType: + properties: + uRI: + expose: true + access_type: public_method + serialized_name: URI + accessor: + getter: getURI + setter: setURI + xml_attribute: true + type: string + type: + expose: true + access_type: public_method + serialized_name: Type + accessor: + getter: getType + setter: setType + xml_attribute: true + type: string + transforms: + expose: true + access_type: public_method + serialized_name: Transforms + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getTransforms + setter: setTransforms + type: array + xml_list: + inline: false + entry_name: Transform + namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml new file mode 100644 index 0000000..d1e6d93 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SPKIData: + xml_root_name: SPKIData + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml new file mode 100644 index 0000000..2b8a30d --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml @@ -0,0 +1,18 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SPKIDataType: + properties: + sPKISexp: + expose: true + access_type: public_method + serialized_name: SPKISexp + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSPKISexp + setter: setSPKISexp + xml_list: + inline: true + entry_name: SPKISexp + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array<\AnySimpleType> + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml new file mode 100644 index 0000000..9f98f3e --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Signature: + xml_root_name: Signature + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml new file mode 100644 index 0000000..787a007 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod: + xml_root_name: SignatureMethod + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml new file mode 100644 index 0000000..f773e0f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml @@ -0,0 +1,23 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethodType: + properties: + algorithm: + expose: true + access_type: public_method + serialized_name: Algorithm + accessor: + getter: getAlgorithm + setter: setAlgorithm + xml_attribute: true + type: string + hMACOutputLength: + expose: true + access_type: public_method + serialized_name: HMACOutputLength + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getHMACOutputLength + setter: setHMACOutputLength + type: integer + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml new file mode 100644 index 0000000..0131015 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperties: + xml_root_name: SignatureProperties + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml new file mode 100644 index 0000000..253f958 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml @@ -0,0 +1,25 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignaturePropertiesType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + signatureProperty: + expose: true + access_type: public_method + serialized_name: SignatureProperty + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSignatureProperty + setter: setSignatureProperty + xml_list: + inline: true + entry_name: SignatureProperty + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml new file mode 100644 index 0000000..5cee452 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty: + xml_root_name: SignatureProperty + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml new file mode 100644 index 0000000..3c24d44 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml @@ -0,0 +1,22 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignaturePropertyType: + properties: + target: + expose: true + access_type: public_method + serialized_name: Target + accessor: + getter: getTarget + setter: setTarget + xml_attribute: true + type: string + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml new file mode 100644 index 0000000..cf3f9b4 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml @@ -0,0 +1,55 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + signedInfo: + expose: true + access_type: public_method + serialized_name: SignedInfo + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSignedInfo + setter: setSignedInfo + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo + signatureValue: + expose: true + access_type: public_method + serialized_name: SignatureValue + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSignatureValue + setter: setSignatureValue + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue + keyInfo: + expose: true + access_type: public_method + serialized_name: KeyInfo + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getKeyInfo + setter: setKeyInfo + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo + object: + expose: true + access_type: public_method + serialized_name: Object + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getObject + setter: setObject + xml_list: + inline: true + entry_name: Object + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml new file mode 100644 index 0000000..0fffd1f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue: + xml_root_name: SignatureValue + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml new file mode 100644 index 0000000..b806968 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml @@ -0,0 +1,19 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValueType: + properties: + __value: + expose: true + xml_value: true + access_type: public_method + accessor: + getter: value + setter: value + type: \AnySimpleType + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml new file mode 100644 index 0000000..53cdeb0 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo: + xml_root_name: SignedInfo + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml new file mode 100644 index 0000000..f4d8b8b --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml @@ -0,0 +1,45 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfoType: + properties: + id: + expose: true + access_type: public_method + serialized_name: Id + accessor: + getter: getId + setter: setId + xml_attribute: true + type: string + canonicalizationMethod: + expose: true + access_type: public_method + serialized_name: CanonicalizationMethod + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getCanonicalizationMethod + setter: setCanonicalizationMethod + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod + signatureMethod: + expose: true + access_type: public_method + serialized_name: SignatureMethod + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getSignatureMethod + setter: setSignatureMethod + type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod + reference: + expose: true + access_type: public_method + serialized_name: Reference + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getReference + setter: setReference + xml_list: + inline: true + entry_name: Reference + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml new file mode 100644 index 0000000..5e35ee7 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform: + xml_root_name: Transform + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml new file mode 100644 index 0000000..afd379f --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml @@ -0,0 +1,27 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\TransformType: + properties: + algorithm: + expose: true + access_type: public_method + serialized_name: Algorithm + accessor: + getter: getAlgorithm + setter: setAlgorithm + xml_attribute: true + type: string + xPath: + expose: true + access_type: public_method + serialized_name: XPath + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getXPath + setter: setXPath + xml_list: + inline: true + entry_name: XPath + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml new file mode 100644 index 0000000..0a1a0a9 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transforms: + xml_root_name: Transforms + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml new file mode 100644 index 0000000..c7b70ab --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml @@ -0,0 +1,16 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\TransformsType: + properties: + transform: + expose: true + access_type: public_method + serialized_name: Transform + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getTransform + setter: setTransform + xml_list: + inline: true + entry_name: Transform + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml new file mode 100644 index 0000000..6d93800 --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml @@ -0,0 +1,3 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data: + xml_root_name: X509Data + xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml new file mode 100644 index 0000000..fc7bd4d --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml @@ -0,0 +1,74 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509DataType: + properties: + x509IssuerSerial: + expose: true + access_type: public_method + serialized_name: X509IssuerSerial + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509IssuerSerial + setter: setX509IssuerSerial + xml_list: + inline: true + entry_name: X509IssuerSerial + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + x509SKI: + expose: true + access_type: public_method + serialized_name: X509SKI + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509SKI + setter: setX509SKI + xml_list: + inline: true + entry_name: X509SKI + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array<\AnySimpleType> + x509SubjectName: + expose: true + access_type: public_method + serialized_name: X509SubjectName + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509SubjectName + setter: setX509SubjectName + xml_list: + inline: true + entry_name: X509SubjectName + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array + x509Certificate: + expose: true + access_type: public_method + serialized_name: X509Certificate + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509Certificate + setter: setX509Certificate + xml_list: + inline: true + entry_name: X509Certificate + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array<\AnySimpleType> + x509CRL: + expose: true + access_type: public_method + serialized_name: X509CRL + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509CRL + setter: setX509CRL + xml_list: + inline: true + entry_name: X509CRL + namespace: 'http://www.w3.org/2000/09/xmldsig#' + type: array<\AnySimpleType> + anyElement: + exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml new file mode 100644 index 0000000..72d412a --- /dev/null +++ b/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml @@ -0,0 +1,22 @@ +GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType: + properties: + x509IssuerName: + expose: true + access_type: public_method + serialized_name: X509IssuerName + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509IssuerName + setter: setX509IssuerName + type: string + x509SerialNumber: + expose: true + access_type: public_method + serialized_name: X509SerialNumber + xml_element: + namespace: 'http://www.w3.org/2000/09/xmldsig#' + accessor: + getter: getX509SerialNumber + setter: setX509SerialNumber + type: integer diff --git a/src/WssWsSecurity/Security.php b/src/WssWsSecurity/Security.php new file mode 100644 index 0000000..90705fd --- /dev/null +++ b/src/WssWsSecurity/Security.php @@ -0,0 +1,150 @@ +password; + } + + /** + * @return \DateTime + */ + public function getTimestamp() + { + return $this->timestamp; + } + + /** + * @param \DateTime $timestamp + */ + public function setTimestamp(\DateTime $timestamp) + { + $this->timestamp = $timestamp; + } + + /** + * @param string $password + * @param int $passwordType + */ + public function setPassword($password, $passwordType = self::PASSWORD_TYPE_DIGEST) + { + $this->password = $password; + $this->passwordType = $passwordType; + } + + /** + * @return int + */ + public function getPasswordType() + { + return $this->passwordType; + } + + /** + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * @param string $username + */ + public function setUsername($username) + { + $this->username = $username; + } + + /** + * @return bool + */ + public function isAddTimestamp() + { + return $this->addTimestamp; + } + + /** + * @param bool $addTimestamp + */ + public function setAddTimestamp($addTimestamp) + { + $this->addTimestamp = $addTimestamp; + } + + /** + * @return int + */ + public function getExpires() + { + return $this->expires; + } + + /** + * @param int $expires + */ + public function setExpires($expires) + { + $this->expires = $expires; + } + + +} diff --git a/src/WssWsSecurity/WssSecurityHeaderEventHandler.php b/src/WssWsSecurity/WssSecurityHeaderEventHandler.php new file mode 100644 index 0000000..8f704f7 --- /dev/null +++ b/src/WssWsSecurity/WssSecurityHeaderEventHandler.php @@ -0,0 +1,70 @@ + 'serializer.post_serialize', + 'method' => 'serializeAnyElement', + 'class' => SecextSecurity::class, + 'format' => 'xml' + ), + array( + 'event' => 'serializer.post_serialize', + 'method' => 'serializeAnyElement', + 'class' => UsernameToken::class, + 'format' => 'xml' + ), + array( + 'event' => 'serializer.post_serialize', + 'method' => 'serializeAnyElement', + 'class' => Timestamp::class, + 'format' => 'xml' + ), + ); + } + + public function serializeAnyElement(ObjectEvent $event) + { + /** + * @var $security SecextSecurity + */ + $security = $event->getObject(); + $items = $security->getAnyElement(); + if (!count($items)) { + return; + } + $context = $event->getContext(); + $visitor = $event->getVisitor(); + $metadataFactory = $context->getMetadataFactory();; + + foreach ($items as $item) { + /** + * @var $itemMetadata ClassMetadata + */ + $itemMetadata = $metadataFactory->getMetadataForClass(get_class($item)); + + $prop = new StaticPropertyMetadata(get_class($item), $itemMetadata->xmlRootName, $item); + $prop->serializedName = $itemMetadata->xmlRootName; + $prop->xmlNamespace = $itemMetadata->xmlRootNamespace; + + $visitor->visitProperty($prop, $item, $context); + } + } +} diff --git a/src/WssWsSecurity/WssSecurityHeaderHandler.php b/src/WssWsSecurity/WssSecurityHeaderHandler.php new file mode 100644 index 0000000..6c0a202 --- /dev/null +++ b/src/WssWsSecurity/WssSecurityHeaderHandler.php @@ -0,0 +1,107 @@ + GraphNavigator::DIRECTION_SERIALIZATION, + 'format' => 'xml', + 'type' => Security::class, + 'method' => 'serializeHeader' + ) + ); + } + + public function setNonce($nonce) + { + $this->nonce = $nonce; + } + + public function serializeHeader(XmlSerializationVisitor $visitor, Security $data, array $type, SerializationContext $context) + { + $dt = $data->getTimestamp() ?: new \DateTime('now', new \DateTimeZone('UTC')); + $security = new SecextSecurity(); + + if ($data->isAddTimestamp() || $data->getExpires() > 0) { + $security->addToAnyElement($this->handleTimestamp($data, $dt)); + } + if (null !== $data->getUsername()) { + $security->addToAnyElement($this->handleUsername($data, $dt)); + } + $context->getNavigator()->accept($security, null, $context); + } + + /** + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security $data + * @param \DateTime $dt + * @return UsernameToken + */ + private function handleUsername(Security $data, \DateTime $dt) + { + $usernameToken = new UsernameToken(); + $usernameToken->setUsername(new AttributedStringType($data->getUsername())); + + if (null !== $data->getPassword()) { + + if (Security::PASSWORD_TYPE_DIGEST === $data->getPasswordType()) { + $nonce = $this->nonce ?: mt_rand(); + $password = base64_encode(sha1($nonce . $dt->format(self::DATETIME_FORMAT) . $data->getPassword(), true)); + $passwordType = self::WSS_UTP . '#PasswordDigest'; + + $usernameToken->addToAnyElement(new Nonce(base64_encode($nonce))); + $usernameToken->addToAnyElement(new Created($dt->format(self::DATETIME_FORMAT))); + + } else { + $password = $data->getPassword(); + $passwordType = self::WSS_UTP . '#PasswordText'; + } + + $passwordItem = new Password($password); + $passwordItem->setType($passwordType); + + $usernameToken->addToAnyElement($passwordItem); + } + return $usernameToken; + } + + /** + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security $data + * @param \DateTime $dt + * @return Timestamp + */ + private function handleTimestamp(Security $data, \DateTime $dt) + { + $timestamp = new Timestamp(); + + $timestamp->setCreated(new Created($dt->format(self::DATETIME_FORMAT))); + + if ($data->getExpires() > 0) { + $expireDate = clone $dt; + $expireDate->modify('+' . $data->getExpires() . ' seconds'); + + $timestamp->setExpires(new Expires($expireDate->format(self::DATETIME_FORMAT))); + } + return $timestamp; + } +} diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php new file mode 100644 index 0000000..f517f85 --- /dev/null +++ b/tests/Serializer/WssSecurityTest.php @@ -0,0 +1,73 @@ +serializer = $generator->buildSerializer(function (HandlerRegistryInterface $h) use ($headerHandler) { + $h->registerSubscribingHandler($headerHandler); + $h->registerSubscribingHandler(new FaultHandler()); + $sechandler = new WssSecurityHeaderHandler(); + $sechandler->setNonce('xx'); + $h->registerSubscribingHandler($sechandler); + }, [ + 'GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12' => dirname($ref->getFileName()) . '/../../../Resources/metadata/jms12', + 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity' => dirname($ref->getFileName()) . '/../../../Resources/metadata/wss-ws-security', + ], function(EventDispatcher $ev) { + $ev->addSubscriber(new WssSecurityHeaderEventHandler()); + }); + + } + + public function testFault12() + { + $wssec = new Security(); + $wssec->setUsername('foo'); + $wssec->setPassword('bar'); + $wssec->setTimestamp(new \DateTime('2010-01-01 00:00:00', new \DateTimeZone('UTC'))); + + $xml = $this->serializer->serialize($wssec, 'xml'); + + $this->assertXmlStringEqualsXmlString(' + + + + + + + + + + + + ', $xml); + + } + + +} diff --git a/ws-security/config.yml b/ws-security/config.yml new file mode 100644 index 0000000..d518823 --- /dev/null +++ b/ws-security/config.yml @@ -0,0 +1,16 @@ +xsd2php: + namespaces: + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext' + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility' + 'http://www.w3.org/2000/09/xmldsig#': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign' + destinations_php: + 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': src/WssWsSecurity + destinations_jms: + 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': src/Resources/metadata/wss-ws-security + known_locations: + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd + 'https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd': ws-security/xmldsig-core-schema.xsd + 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd': ws-security/xmldsig-core-schema.xsd + any_element: true + any_attribute: true diff --git a/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd b/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd new file mode 100644 index 0000000..7596dc5 --- /dev/null +++ b/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd @@ -0,0 +1,195 @@ + + + + + + + + + This type represents an element with arbitrary attributes. + + + + + + + + + + + This type is used for password elements per Section 4.1. + + + + + + + + + + This type is used for elements containing stringified binary data. + + + + + + + + + + This type represents a username token per Section 4.1 + + + + + + + + + + + A security token that is encoded in binary + + + + + + + + + + A security token key identifier + + + + + + + + + + Typedef to allow a list of usages (as URIs). + + + + + + This global attribute is used to indicate the usage of a referenced or indicated token within the containing context + + + + + This type represents a reference to an external security token. + + + + + + + + This type represents a reference to an embedded security token. + + + + + + + + + + This type is used reference a security token. + + + + + + + + + + + This complexType defines header block to use for security-relevant data directed at a specific SOAP actor. + + + + + The use of "any" is to allow extensibility and different forms of security data. + + + + + + + + This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation. + + + + + The use of "any" is to allow extensibility from any namespace. + + + + + + + + This element defines the wsse:UsernameToken element per Section 4.1. + + + + + This element defines the wsse:BinarySecurityToken element per Section 4.2. + + + + + This element defines a security token reference + + + + + This element defines a security token embedded reference + + + + + This element defines a key identifier reference + + + + + This element defines the wsse:SecurityTokenReference per Section 4.3. + + + + + This element defines the wsse:Security SOAP header element per Section 4. + + + + + This element contains properties for transformations from any namespace, including DSIG. + + + + + + + + + + + + + + + + diff --git a/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd b/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd new file mode 100644 index 0000000..e088d13 --- /dev/null +++ b/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd @@ -0,0 +1,108 @@ + + + + + + + +This type defines the fault code value for Timestamp message expiration. + + + + + + + + + + +This global attribute supports annotating arbitrary elements with an ID. + + + + + + +Convenience attribute group used to simplify this schema. + + + + + + + + + +This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. + + + + + + + + + + + +This type is for elements whose [children] is an anyURI and can have arbitrary attributes. + + + + + + + + + + + + +This complex type ties together the timestamp related elements into a composite type. + + + + + + + + + + + + + + +This element allows Timestamps to be applied anywhere element wildcards are present, +including as a SOAP header. + + + + + + + +This element allows an expiration time to be applied anywhere element wildcards are present. + + + + + + +This element allows a creation time to be applied anywhere element wildcards are present. + + + + diff --git a/ws-security/xmldsig-core-schema.xsd b/ws-security/xmldsig-core-schema.xsd new file mode 100644 index 0000000..e28dca5 --- /dev/null +++ b/ws-security/xmldsig-core-schema.xsd @@ -0,0 +1,318 @@ + + + + + + ]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 87c9bd5dbd66121aebeeeaf0766858b7b1e99928 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Fri, 16 Dec 2016 13:46:32 +0100 Subject: [PATCH 03/17] added missing classes --- .../Secext/AttributedStringType.php | 82 +++ .../Secext/BinarySecurityToken.php | 13 + .../Secext/BinarySecurityTokenType.php | 43 ++ src/WssWsSecurity/Secext/Embedded.php | 13 + src/WssWsSecurity/Secext/EmbeddedType.php | 169 ++++++ .../Secext/EncodedStringType.php | 43 ++ src/WssWsSecurity/Secext/KeyIdentifier.php | 13 + .../Secext/KeyIdentifierType.php | 43 ++ src/WssWsSecurity/Secext/Nonce.php | 13 + src/WssWsSecurity/Secext/Password.php | 13 + .../Secext/PasswordStringType.php | 43 ++ src/WssWsSecurity/Secext/Reference.php | 13 + src/WssWsSecurity/Secext/ReferenceType.php | 133 +++++ src/WssWsSecurity/Secext/Security.php | 13 + .../Secext/SecurityHeaderType.php | 143 +++++ .../Secext/SecurityTokenReference.php | 13 + .../Secext/SecurityTokenReferenceType.php | 230 ++++++++ .../Secext/TransformationParameters.php | 13 + .../Secext/TransformationParametersType.php | 143 +++++ src/WssWsSecurity/Secext/UsernameToken.php | 13 + .../Secext/UsernameTokenType.php | 201 +++++++ .../Utility/AttributedDateTimeType.php | 83 +++ .../Utility/AttributedURIType.php | 83 +++ src/WssWsSecurity/Utility/Created.php | 13 + src/WssWsSecurity/Utility/Expires.php | 13 + src/WssWsSecurity/Utility/Timestamp.php | 13 + src/WssWsSecurity/Utility/TimestampType.php | 167 ++++++ .../XmlSign/CanonicalizationMethod.php | 13 + .../XmlSign/CanonicalizationMethodType.php | 106 ++++ src/WssWsSecurity/XmlSign/DSAKeyValue.php | 13 + src/WssWsSecurity/XmlSign/DSAKeyValueType.php | 205 +++++++ src/WssWsSecurity/XmlSign/DigestMethod.php | 13 + .../XmlSign/DigestMethodType.php | 106 ++++ src/WssWsSecurity/XmlSign/DigestValue.php | 52 ++ src/WssWsSecurity/XmlSign/KeyInfo.php | 13 + src/WssWsSecurity/XmlSign/KeyInfoType.php | 558 ++++++++++++++++++ src/WssWsSecurity/XmlSign/KeyName.php | 52 ++ src/WssWsSecurity/XmlSign/KeyValue.php | 13 + src/WssWsSecurity/XmlSign/KeyValueType.php | 143 +++++ src/WssWsSecurity/XmlSign/Manifest.php | 13 + src/WssWsSecurity/XmlSign/ManifestType.php | 111 ++++ src/WssWsSecurity/XmlSign/MgmtData.php | 52 ++ src/WssWsSecurity/XmlSign/ObjectType.php | 160 +++++ src/WssWsSecurity/XmlSign/ObjectXsd.php | 13 + src/WssWsSecurity/XmlSign/PGPData.php | 13 + src/WssWsSecurity/XmlSign/PGPDataType.php | 133 +++++ src/WssWsSecurity/XmlSign/RSAKeyValue.php | 13 + src/WssWsSecurity/XmlSign/RSAKeyValueType.php | 70 +++ src/WssWsSecurity/XmlSign/Reference.php | 13 + src/WssWsSecurity/XmlSign/ReferenceType.php | 224 +++++++ src/WssWsSecurity/XmlSign/RetrievalMethod.php | 13 + .../XmlSign/RetrievalMethodType.php | 138 +++++ src/WssWsSecurity/XmlSign/SPKIData.php | 13 + src/WssWsSecurity/XmlSign/SPKIDataType.php | 140 +++++ src/WssWsSecurity/XmlSign/Signature.php | 13 + src/WssWsSecurity/XmlSign/SignatureMethod.php | 13 + .../XmlSign/SignatureMethodType.php | 133 +++++ .../XmlSign/SignatureProperties.php | 13 + .../XmlSign/SignaturePropertiesType.php | 111 ++++ .../XmlSign/SignatureProperty.php | 13 + .../XmlSign/SignaturePropertyType.php | 133 +++++ src/WssWsSecurity/XmlSign/SignatureType.php | 205 +++++++ src/WssWsSecurity/XmlSign/SignatureValue.php | 13 + .../XmlSign/SignatureValueType.php | 82 +++ src/WssWsSecurity/XmlSign/SignedInfo.php | 13 + src/WssWsSecurity/XmlSign/SignedInfoType.php | 175 ++++++ src/WssWsSecurity/XmlSign/Transform.php | 13 + src/WssWsSecurity/XmlSign/TransformType.php | 167 ++++++ src/WssWsSecurity/XmlSign/Transforms.php | 13 + src/WssWsSecurity/XmlSign/TransformsType.php | 84 +++ src/WssWsSecurity/XmlSign/X509Data.php | 13 + src/WssWsSecurity/XmlSign/X509DataType.php | 391 ++++++++++++ .../XmlSign/X509IssuerSerialType.php | 70 +++ tests/Serializer/WssSecurityTest.php | 25 +- 74 files changed, 5873 insertions(+), 1 deletion(-) create mode 100644 src/WssWsSecurity/Secext/AttributedStringType.php create mode 100644 src/WssWsSecurity/Secext/BinarySecurityToken.php create mode 100644 src/WssWsSecurity/Secext/BinarySecurityTokenType.php create mode 100644 src/WssWsSecurity/Secext/Embedded.php create mode 100644 src/WssWsSecurity/Secext/EmbeddedType.php create mode 100644 src/WssWsSecurity/Secext/EncodedStringType.php create mode 100644 src/WssWsSecurity/Secext/KeyIdentifier.php create mode 100644 src/WssWsSecurity/Secext/KeyIdentifierType.php create mode 100644 src/WssWsSecurity/Secext/Nonce.php create mode 100644 src/WssWsSecurity/Secext/Password.php create mode 100644 src/WssWsSecurity/Secext/PasswordStringType.php create mode 100644 src/WssWsSecurity/Secext/Reference.php create mode 100644 src/WssWsSecurity/Secext/ReferenceType.php create mode 100644 src/WssWsSecurity/Secext/Security.php create mode 100644 src/WssWsSecurity/Secext/SecurityHeaderType.php create mode 100644 src/WssWsSecurity/Secext/SecurityTokenReference.php create mode 100644 src/WssWsSecurity/Secext/SecurityTokenReferenceType.php create mode 100644 src/WssWsSecurity/Secext/TransformationParameters.php create mode 100644 src/WssWsSecurity/Secext/TransformationParametersType.php create mode 100644 src/WssWsSecurity/Secext/UsernameToken.php create mode 100644 src/WssWsSecurity/Secext/UsernameTokenType.php create mode 100644 src/WssWsSecurity/Utility/AttributedDateTimeType.php create mode 100644 src/WssWsSecurity/Utility/AttributedURIType.php create mode 100644 src/WssWsSecurity/Utility/Created.php create mode 100644 src/WssWsSecurity/Utility/Expires.php create mode 100644 src/WssWsSecurity/Utility/Timestamp.php create mode 100644 src/WssWsSecurity/Utility/TimestampType.php create mode 100644 src/WssWsSecurity/XmlSign/CanonicalizationMethod.php create mode 100644 src/WssWsSecurity/XmlSign/CanonicalizationMethodType.php create mode 100644 src/WssWsSecurity/XmlSign/DSAKeyValue.php create mode 100644 src/WssWsSecurity/XmlSign/DSAKeyValueType.php create mode 100644 src/WssWsSecurity/XmlSign/DigestMethod.php create mode 100644 src/WssWsSecurity/XmlSign/DigestMethodType.php create mode 100644 src/WssWsSecurity/XmlSign/DigestValue.php create mode 100644 src/WssWsSecurity/XmlSign/KeyInfo.php create mode 100644 src/WssWsSecurity/XmlSign/KeyInfoType.php create mode 100644 src/WssWsSecurity/XmlSign/KeyName.php create mode 100644 src/WssWsSecurity/XmlSign/KeyValue.php create mode 100644 src/WssWsSecurity/XmlSign/KeyValueType.php create mode 100644 src/WssWsSecurity/XmlSign/Manifest.php create mode 100644 src/WssWsSecurity/XmlSign/ManifestType.php create mode 100644 src/WssWsSecurity/XmlSign/MgmtData.php create mode 100644 src/WssWsSecurity/XmlSign/ObjectType.php create mode 100644 src/WssWsSecurity/XmlSign/ObjectXsd.php create mode 100644 src/WssWsSecurity/XmlSign/PGPData.php create mode 100644 src/WssWsSecurity/XmlSign/PGPDataType.php create mode 100644 src/WssWsSecurity/XmlSign/RSAKeyValue.php create mode 100644 src/WssWsSecurity/XmlSign/RSAKeyValueType.php create mode 100644 src/WssWsSecurity/XmlSign/Reference.php create mode 100644 src/WssWsSecurity/XmlSign/ReferenceType.php create mode 100644 src/WssWsSecurity/XmlSign/RetrievalMethod.php create mode 100644 src/WssWsSecurity/XmlSign/RetrievalMethodType.php create mode 100644 src/WssWsSecurity/XmlSign/SPKIData.php create mode 100644 src/WssWsSecurity/XmlSign/SPKIDataType.php create mode 100644 src/WssWsSecurity/XmlSign/Signature.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureMethod.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureMethodType.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureProperties.php create mode 100644 src/WssWsSecurity/XmlSign/SignaturePropertiesType.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureProperty.php create mode 100644 src/WssWsSecurity/XmlSign/SignaturePropertyType.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureType.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureValue.php create mode 100644 src/WssWsSecurity/XmlSign/SignatureValueType.php create mode 100644 src/WssWsSecurity/XmlSign/SignedInfo.php create mode 100644 src/WssWsSecurity/XmlSign/SignedInfoType.php create mode 100644 src/WssWsSecurity/XmlSign/Transform.php create mode 100644 src/WssWsSecurity/XmlSign/TransformType.php create mode 100644 src/WssWsSecurity/XmlSign/Transforms.php create mode 100644 src/WssWsSecurity/XmlSign/TransformsType.php create mode 100644 src/WssWsSecurity/XmlSign/X509Data.php create mode 100644 src/WssWsSecurity/XmlSign/X509DataType.php create mode 100644 src/WssWsSecurity/XmlSign/X509IssuerSerialType.php diff --git a/src/WssWsSecurity/Secext/AttributedStringType.php b/src/WssWsSecurity/Secext/AttributedStringType.php new file mode 100644 index 0000000..6b0da7a --- /dev/null +++ b/src/WssWsSecurity/Secext/AttributedStringType.php @@ -0,0 +1,82 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param string $value + * @return string + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + /** + * Gets as id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/BinarySecurityToken.php b/src/WssWsSecurity/Secext/BinarySecurityToken.php new file mode 100644 index 0000000..3d5ae59 --- /dev/null +++ b/src/WssWsSecurity/Secext/BinarySecurityToken.php @@ -0,0 +1,13 @@ +valueType; + } + + /** + * Sets a new valueType + * + * @param string $valueType + * @return self + */ + public function setValueType($valueType) + { + $this->valueType = $valueType; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/Embedded.php b/src/WssWsSecurity/Secext/Embedded.php new file mode 100644 index 0000000..bda4b3c --- /dev/null +++ b/src/WssWsSecurity/Secext/Embedded.php @@ -0,0 +1,13 @@ +valueType; + } + + /** + * Sets a new valueType + * + * @param string $valueType + * @return self + */ + public function setValueType($valueType) + { + $this->valueType = $valueType; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyAttribute($array) + { + $this->anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/EncodedStringType.php b/src/WssWsSecurity/Secext/EncodedStringType.php new file mode 100644 index 0000000..43ab31f --- /dev/null +++ b/src/WssWsSecurity/Secext/EncodedStringType.php @@ -0,0 +1,43 @@ +encodingType; + } + + /** + * Sets a new encodingType + * + * @param string $encodingType + * @return self + */ + public function setEncodingType($encodingType) + { + $this->encodingType = $encodingType; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/KeyIdentifier.php b/src/WssWsSecurity/Secext/KeyIdentifier.php new file mode 100644 index 0000000..e1ce430 --- /dev/null +++ b/src/WssWsSecurity/Secext/KeyIdentifier.php @@ -0,0 +1,13 @@ +valueType; + } + + /** + * Sets a new valueType + * + * @param string $valueType + * @return self + */ + public function setValueType($valueType) + { + $this->valueType = $valueType; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/Nonce.php b/src/WssWsSecurity/Secext/Nonce.php new file mode 100644 index 0000000..da099e4 --- /dev/null +++ b/src/WssWsSecurity/Secext/Nonce.php @@ -0,0 +1,13 @@ +type; + } + + /** + * Sets a new type + * + * @param string $type + * @return self + */ + public function setType($type) + { + $this->type = $type; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/Reference.php b/src/WssWsSecurity/Secext/Reference.php new file mode 100644 index 0000000..86b7822 --- /dev/null +++ b/src/WssWsSecurity/Secext/Reference.php @@ -0,0 +1,13 @@ +uRI; + } + + /** + * Sets a new uRI + * + * @param string $uRI + * @return self + */ + public function setURI($uRI) + { + $this->uRI = $uRI; + return $this; + } + + /** + * Gets as valueType + * + * @return string + */ + public function getValueType() + { + return $this->valueType; + } + + /** + * Sets a new valueType + * + * @param string $valueType + * @return self + */ + public function setValueType($valueType) + { + $this->valueType = $valueType; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyAttribute($array) + { + $this->anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/Security.php b/src/WssWsSecurity/Secext/Security.php new file mode 100644 index 0000000..e68bc39 --- /dev/null +++ b/src/WssWsSecurity/Secext/Security.php @@ -0,0 +1,13 @@ +anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/SecurityTokenReference.php b/src/WssWsSecurity/Secext/SecurityTokenReference.php new file mode 100644 index 0000000..a6af5b4 --- /dev/null +++ b/src/WssWsSecurity/Secext/SecurityTokenReference.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as usage + * + * @return self + * @param string $usage + */ + public function addToUsage($usage) + { + $this->usage[] = $usage; + return $this; + } + + /** + * isset usage + * + * @param scalar $index + * @return boolean + */ + public function issetUsage($index) + { + return isset($this->usage[$index]); + } + + /** + * unset usage + * + * @param scalar $index + * @return void + */ + public function unsetUsage($index) + { + unset($this->usage[$index]); + } + + /** + * Gets as usage + * + * @return string[] + */ + public function getUsage() + { + return $this->usage; + } + + /** + * Sets a new usage + * + * @param string[] $usage + * @return self + */ + public function setUsage(array $usage) + { + $this->usage = $usage; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyAttribute($array) + { + $this->anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/TransformationParameters.php b/src/WssWsSecurity/Secext/TransformationParameters.php new file mode 100644 index 0000000..f105714 --- /dev/null +++ b/src/WssWsSecurity/Secext/TransformationParameters.php @@ -0,0 +1,13 @@ +anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Secext/UsernameToken.php b/src/WssWsSecurity/Secext/UsernameToken.php new file mode 100644 index 0000000..977543a --- /dev/null +++ b/src/WssWsSecurity/Secext/UsernameToken.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyAttribute($array) + { + $this->anyAttribute[] = $array; + return $this; + } + + /** + * isset anyAttribute + * + * @param scalar $index + * @return boolean + */ + public function issetAnyAttribute($index) + { + return isset($this->anyAttribute[$index]); + } + + /** + * unset anyAttribute + * + * @param scalar $index + * @return void + */ + public function unsetAnyAttribute($index) + { + unset($this->anyAttribute[$index]); + } + + /** + * Gets as anyAttribute + * + * @return mixed[] + */ + public function getAnyAttribute() + { + return $this->anyAttribute; + } + + /** + * Sets a new anyAttribute + * + * @param mixed[] $anyAttribute + * @return self + */ + public function setAnyAttribute(array $anyAttribute) + { + $this->anyAttribute = $anyAttribute; + return $this; + } + + /** + * Gets as username + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType + */ + public function getUsername() + { + return $this->username; + } + + /** + * Sets a new username + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType + * $username + * @return self + */ + public function setUsername(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType $username) + { + $this->username = $username; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Utility/AttributedDateTimeType.php b/src/WssWsSecurity/Utility/AttributedDateTimeType.php new file mode 100644 index 0000000..d730633 --- /dev/null +++ b/src/WssWsSecurity/Utility/AttributedDateTimeType.php @@ -0,0 +1,83 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param string $value + * @return string + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + /** + * Gets as id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Utility/AttributedURIType.php b/src/WssWsSecurity/Utility/AttributedURIType.php new file mode 100644 index 0000000..4fce48d --- /dev/null +++ b/src/WssWsSecurity/Utility/AttributedURIType.php @@ -0,0 +1,83 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param string $value + * @return string + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + /** + * Gets as id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/Utility/Created.php b/src/WssWsSecurity/Utility/Created.php new file mode 100644 index 0000000..0e15189 --- /dev/null +++ b/src/WssWsSecurity/Utility/Created.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Gets as created + * + * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created + */ + public function getCreated() + { + return $this->created; + } + + /** + * Sets a new created + * + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created + * $created + * @return self + */ + public function setCreated(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created $created) + { + $this->created = $created; + return $this; + } + + /** + * Gets as expires + * + * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires + */ + public function getExpires() + { + return $this->expires; + } + + /** + * Sets a new expires + * + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires + * $expires + * @return self + */ + public function setExpires(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires $expires) + { + $this->expires = $expires; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php b/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php new file mode 100644 index 0000000..b6997c3 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php @@ -0,0 +1,13 @@ +algorithm; + } + + /** + * Sets a new algorithm + * + * @param string $algorithm + * @return self + */ + public function setAlgorithm($algorithm) + { + $this->algorithm = $algorithm; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/DSAKeyValue.php b/src/WssWsSecurity/XmlSign/DSAKeyValue.php new file mode 100644 index 0000000..9601265 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/DSAKeyValue.php @@ -0,0 +1,13 @@ +p; + } + + /** + * Sets a new p + * + * @param mixed $p + * @return self + */ + public function setP($p) + { + $this->p = $p; + return $this; + } + + /** + * Gets as q + * + * @return mixed + */ + public function getQ() + { + return $this->q; + } + + /** + * Sets a new q + * + * @param mixed $q + * @return self + */ + public function setQ($q) + { + $this->q = $q; + return $this; + } + + /** + * Gets as g + * + * @return mixed + */ + public function getG() + { + return $this->g; + } + + /** + * Sets a new g + * + * @param mixed $g + * @return self + */ + public function setG($g) + { + $this->g = $g; + return $this; + } + + /** + * Gets as y + * + * @return mixed + */ + public function getY() + { + return $this->y; + } + + /** + * Sets a new y + * + * @param mixed $y + * @return self + */ + public function setY($y) + { + $this->y = $y; + return $this; + } + + /** + * Gets as j + * + * @return mixed + */ + public function getJ() + { + return $this->j; + } + + /** + * Sets a new j + * + * @param mixed $j + * @return self + */ + public function setJ($j) + { + $this->j = $j; + return $this; + } + + /** + * Gets as seed + * + * @return mixed + */ + public function getSeed() + { + return $this->seed; + } + + /** + * Sets a new seed + * + * @param mixed $seed + * @return self + */ + public function setSeed($seed) + { + $this->seed = $seed; + return $this; + } + + /** + * Gets as pgenCounter + * + * @return mixed + */ + public function getPgenCounter() + { + return $this->pgenCounter; + } + + /** + * Sets a new pgenCounter + * + * @param mixed $pgenCounter + * @return self + */ + public function setPgenCounter($pgenCounter) + { + $this->pgenCounter = $pgenCounter; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/DigestMethod.php b/src/WssWsSecurity/XmlSign/DigestMethod.php new file mode 100644 index 0000000..ede0eee --- /dev/null +++ b/src/WssWsSecurity/XmlSign/DigestMethod.php @@ -0,0 +1,13 @@ +algorithm; + } + + /** + * Sets a new algorithm + * + * @param string $algorithm + * @return self + */ + public function setAlgorithm($algorithm) + { + $this->algorithm = $algorithm; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/DigestValue.php b/src/WssWsSecurity/XmlSign/DigestValue.php new file mode 100644 index 0000000..f4a7e30 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/DigestValue.php @@ -0,0 +1,52 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param mixed $value + * @return mixed + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/KeyInfo.php b/src/WssWsSecurity/XmlSign/KeyInfo.php new file mode 100644 index 0000000..18472c9 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/KeyInfo.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as keyName + * + * @return self + * @param string $keyName + */ + public function addToKeyName($keyName) + { + $this->keyName[] = $keyName; + return $this; + } + + /** + * isset keyName + * + * @param scalar $index + * @return boolean + */ + public function issetKeyName($index) + { + return isset($this->keyName[$index]); + } + + /** + * unset keyName + * + * @param scalar $index + * @return void + */ + public function unsetKeyName($index) + { + unset($this->keyName[$index]); + } + + /** + * Gets as keyName + * + * @return string[] + */ + public function getKeyName() + { + return $this->keyName; + } + + /** + * Sets a new keyName + * + * @param string $keyName + * @return self + */ + public function setKeyName(array $keyName) + { + $this->keyName = $keyName; + return $this; + } + + /** + * Adds as keyValue + * + * @return self + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue + * $keyValue + */ + public function addToKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue $keyValue) + { + $this->keyValue[] = $keyValue; + return $this; + } + + /** + * isset keyValue + * + * @param scalar $index + * @return boolean + */ + public function issetKeyValue($index) + { + return isset($this->keyValue[$index]); + } + + /** + * unset keyValue + * + * @param scalar $index + * @return void + */ + public function unsetKeyValue($index) + { + unset($this->keyValue[$index]); + } + + /** + * Gets as keyValue + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue[] + */ + public function getKeyValue() + { + return $this->keyValue; + } + + /** + * Sets a new keyValue + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue[] + * $keyValue + * @return self + */ + public function setKeyValue(array $keyValue) + { + $this->keyValue = $keyValue; + return $this; + } + + /** + * Adds as retrievalMethod + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod + * $retrievalMethod + */ + public function addToRetrievalMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod $retrievalMethod) + { + $this->retrievalMethod[] = $retrievalMethod; + return $this; + } + + /** + * isset retrievalMethod + * + * @param scalar $index + * @return boolean + */ + public function issetRetrievalMethod($index) + { + return isset($this->retrievalMethod[$index]); + } + + /** + * unset retrievalMethod + * + * @param scalar $index + * @return void + */ + public function unsetRetrievalMethod($index) + { + unset($this->retrievalMethod[$index]); + } + + /** + * Gets as retrievalMethod + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod[] + */ + public function getRetrievalMethod() + { + return $this->retrievalMethod; + } + + /** + * Sets a new retrievalMethod + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod[] + * $retrievalMethod + * @return self + */ + public function setRetrievalMethod(array $retrievalMethod) + { + $this->retrievalMethod = $retrievalMethod; + return $this; + } + + /** + * Adds as x509Data + * + * @return self + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data + * $x509Data + */ + public function addToX509Data(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data $x509Data) + { + $this->x509Data[] = $x509Data; + return $this; + } + + /** + * isset x509Data + * + * @param scalar $index + * @return boolean + */ + public function issetX509Data($index) + { + return isset($this->x509Data[$index]); + } + + /** + * unset x509Data + * + * @param scalar $index + * @return void + */ + public function unsetX509Data($index) + { + unset($this->x509Data[$index]); + } + + /** + * Gets as x509Data + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data[] + */ + public function getX509Data() + { + return $this->x509Data; + } + + /** + * Sets a new x509Data + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data[] + * $x509Data + * @return self + */ + public function setX509Data(array $x509Data) + { + $this->x509Data = $x509Data; + return $this; + } + + /** + * Adds as pGPData + * + * @return self + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData + * $pGPData + */ + public function addToPGPData(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData $pGPData) + { + $this->pGPData[] = $pGPData; + return $this; + } + + /** + * isset pGPData + * + * @param scalar $index + * @return boolean + */ + public function issetPGPData($index) + { + return isset($this->pGPData[$index]); + } + + /** + * unset pGPData + * + * @param scalar $index + * @return void + */ + public function unsetPGPData($index) + { + unset($this->pGPData[$index]); + } + + /** + * Gets as pGPData + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData[] + */ + public function getPGPData() + { + return $this->pGPData; + } + + /** + * Sets a new pGPData + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData[] + * $pGPData + * @return self + */ + public function setPGPData(array $pGPData) + { + $this->pGPData = $pGPData; + return $this; + } + + /** + * Adds as sPKISexp + * + * @return self + * @param mixed $sPKISexp + */ + public function addToSPKIData($sPKISexp) + { + $this->sPKIData[] = $sPKISexp; + return $this; + } + + /** + * isset sPKIData + * + * @param scalar $index + * @return boolean + */ + public function issetSPKIData($index) + { + return isset($this->sPKIData[$index]); + } + + /** + * unset sPKIData + * + * @param scalar $index + * @return void + */ + public function unsetSPKIData($index) + { + unset($this->sPKIData[$index]); + } + + /** + * Gets as sPKIData + * + * @return mixed[] + */ + public function getSPKIData() + { + return $this->sPKIData; + } + + /** + * Sets a new sPKIData + * + * @param mixed $sPKIData + * @return self + */ + public function setSPKIData(array $sPKIData) + { + $this->sPKIData = $sPKIData; + return $this; + } + + /** + * Adds as mgmtData + * + * @return self + * @param string $mgmtData + */ + public function addToMgmtData($mgmtData) + { + $this->mgmtData[] = $mgmtData; + return $this; + } + + /** + * isset mgmtData + * + * @param scalar $index + * @return boolean + */ + public function issetMgmtData($index) + { + return isset($this->mgmtData[$index]); + } + + /** + * unset mgmtData + * + * @param scalar $index + * @return void + */ + public function unsetMgmtData($index) + { + unset($this->mgmtData[$index]); + } + + /** + * Gets as mgmtData + * + * @return string[] + */ + public function getMgmtData() + { + return $this->mgmtData; + } + + /** + * Sets a new mgmtData + * + * @param string $mgmtData + * @return self + */ + public function setMgmtData(array $mgmtData) + { + $this->mgmtData = $mgmtData; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/KeyName.php b/src/WssWsSecurity/XmlSign/KeyName.php new file mode 100644 index 0000000..984a0d6 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/KeyName.php @@ -0,0 +1,52 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param string $value + * @return string + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/KeyValue.php b/src/WssWsSecurity/XmlSign/KeyValue.php new file mode 100644 index 0000000..18731b5 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/KeyValue.php @@ -0,0 +1,13 @@ +dSAKeyValue; + } + + /** + * Sets a new dSAKeyValue + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue + * $dSAKeyValue + * @return self + */ + public function setDSAKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue $dSAKeyValue) + { + $this->dSAKeyValue = $dSAKeyValue; + return $this; + } + + /** + * Gets as rSAKeyValue + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue + */ + public function getRSAKeyValue() + { + return $this->rSAKeyValue; + } + + /** + * Sets a new rSAKeyValue + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue + * $rSAKeyValue + * @return self + */ + public function setRSAKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue $rSAKeyValue) + { + $this->rSAKeyValue = $rSAKeyValue; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/Manifest.php b/src/WssWsSecurity/XmlSign/Manifest.php new file mode 100644 index 0000000..d83fc9f --- /dev/null +++ b/src/WssWsSecurity/XmlSign/Manifest.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as reference + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference + * $reference + */ + public function addToReference(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference $reference) + { + $this->reference[] = $reference; + return $this; + } + + /** + * isset reference + * + * @param scalar $index + * @return boolean + */ + public function issetReference($index) + { + return isset($this->reference[$index]); + } + + /** + * unset reference + * + * @param scalar $index + * @return void + */ + public function unsetReference($index) + { + unset($this->reference[$index]); + } + + /** + * Gets as reference + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] + */ + public function getReference() + { + return $this->reference; + } + + /** + * Sets a new reference + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] + * $reference + * @return self + */ + public function setReference(array $reference) + { + $this->reference = $reference; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/MgmtData.php b/src/WssWsSecurity/XmlSign/MgmtData.php new file mode 100644 index 0000000..55b86e1 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/MgmtData.php @@ -0,0 +1,52 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param string $value + * @return string + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/ObjectType.php b/src/WssWsSecurity/XmlSign/ObjectType.php new file mode 100644 index 0000000..f58e651 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/ObjectType.php @@ -0,0 +1,160 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Gets as mimeType + * + * @return string + */ + public function getMimeType() + { + return $this->mimeType; + } + + /** + * Sets a new mimeType + * + * @param string $mimeType + * @return self + */ + public function setMimeType($mimeType) + { + $this->mimeType = $mimeType; + return $this; + } + + /** + * Gets as encoding + * + * @return string + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Sets a new encoding + * + * @param string $encoding + * @return self + */ + public function setEncoding($encoding) + { + $this->encoding = $encoding; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/ObjectXsd.php b/src/WssWsSecurity/XmlSign/ObjectXsd.php new file mode 100644 index 0000000..134798e --- /dev/null +++ b/src/WssWsSecurity/XmlSign/ObjectXsd.php @@ -0,0 +1,13 @@ +pGPKeyID; + } + + /** + * Sets a new pGPKeyID + * + * @param mixed $pGPKeyID + * @return self + */ + public function setPGPKeyID($pGPKeyID) + { + $this->pGPKeyID = $pGPKeyID; + return $this; + } + + /** + * Gets as pGPKeyPacket + * + * @return mixed + */ + public function getPGPKeyPacket() + { + return $this->pGPKeyPacket; + } + + /** + * Sets a new pGPKeyPacket + * + * @param mixed $pGPKeyPacket + * @return self + */ + public function setPGPKeyPacket($pGPKeyPacket) + { + $this->pGPKeyPacket = $pGPKeyPacket; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/RSAKeyValue.php b/src/WssWsSecurity/XmlSign/RSAKeyValue.php new file mode 100644 index 0000000..cb47d04 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/RSAKeyValue.php @@ -0,0 +1,13 @@ +modulus; + } + + /** + * Sets a new modulus + * + * @param mixed $modulus + * @return self + */ + public function setModulus($modulus) + { + $this->modulus = $modulus; + return $this; + } + + /** + * Gets as exponent + * + * @return mixed + */ + public function getExponent() + { + return $this->exponent; + } + + /** + * Sets a new exponent + * + * @param mixed $exponent + * @return self + */ + public function setExponent($exponent) + { + $this->exponent = $exponent; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/Reference.php b/src/WssWsSecurity/XmlSign/Reference.php new file mode 100644 index 0000000..019806d --- /dev/null +++ b/src/WssWsSecurity/XmlSign/Reference.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Gets as uRI + * + * @return string + */ + public function getURI() + { + return $this->uRI; + } + + /** + * Sets a new uRI + * + * @param string $uRI + * @return self + */ + public function setURI($uRI) + { + $this->uRI = $uRI; + return $this; + } + + /** + * Gets as type + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Sets a new type + * + * @param string $type + * @return self + */ + public function setType($type) + { + $this->type = $type; + return $this; + } + + /** + * Adds as transform + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform + * $transform + */ + public function addToTransforms(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform $transform) + { + $this->transforms[] = $transform; + return $this; + } + + /** + * isset transforms + * + * @param scalar $index + * @return boolean + */ + public function issetTransforms($index) + { + return isset($this->transforms[$index]); + } + + /** + * unset transforms + * + * @param scalar $index + * @return void + */ + public function unsetTransforms($index) + { + unset($this->transforms[$index]); + } + + /** + * Gets as transforms + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + */ + public function getTransforms() + { + return $this->transforms; + } + + /** + * Sets a new transforms + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + * $transforms + * @return self + */ + public function setTransforms(array $transforms) + { + $this->transforms = $transforms; + return $this; + } + + /** + * Gets as digestMethod + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod + */ + public function getDigestMethod() + { + return $this->digestMethod; + } + + /** + * Sets a new digestMethod + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod + * $digestMethod + * @return self + */ + public function setDigestMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod $digestMethod) + { + $this->digestMethod = $digestMethod; + return $this; + } + + /** + * Gets as digestValue + * + * @return mixed + */ + public function getDigestValue() + { + return $this->digestValue; + } + + /** + * Sets a new digestValue + * + * @param mixed $digestValue + * @return self + */ + public function setDigestValue($digestValue) + { + $this->digestValue = $digestValue; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/RetrievalMethod.php b/src/WssWsSecurity/XmlSign/RetrievalMethod.php new file mode 100644 index 0000000..c0c9edf --- /dev/null +++ b/src/WssWsSecurity/XmlSign/RetrievalMethod.php @@ -0,0 +1,13 @@ +uRI; + } + + /** + * Sets a new uRI + * + * @param string $uRI + * @return self + */ + public function setURI($uRI) + { + $this->uRI = $uRI; + return $this; + } + + /** + * Gets as type + * + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Sets a new type + * + * @param string $type + * @return self + */ + public function setType($type) + { + $this->type = $type; + return $this; + } + + /** + * Adds as transform + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform + * $transform + */ + public function addToTransforms(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform $transform) + { + $this->transforms[] = $transform; + return $this; + } + + /** + * isset transforms + * + * @param scalar $index + * @return boolean + */ + public function issetTransforms($index) + { + return isset($this->transforms[$index]); + } + + /** + * unset transforms + * + * @param scalar $index + * @return void + */ + public function unsetTransforms($index) + { + unset($this->transforms[$index]); + } + + /** + * Gets as transforms + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + */ + public function getTransforms() + { + return $this->transforms; + } + + /** + * Sets a new transforms + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + * $transforms + * @return self + */ + public function setTransforms(array $transforms) + { + $this->transforms = $transforms; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SPKIData.php b/src/WssWsSecurity/XmlSign/SPKIData.php new file mode 100644 index 0000000..6fb2457 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SPKIData.php @@ -0,0 +1,13 @@ +sPKISexp[] = $sPKISexp; + return $this; + } + + /** + * isset sPKISexp + * + * @param scalar $index + * @return boolean + */ + public function issetSPKISexp($index) + { + return isset($this->sPKISexp[$index]); + } + + /** + * unset sPKISexp + * + * @param scalar $index + * @return void + */ + public function unsetSPKISexp($index) + { + unset($this->sPKISexp[$index]); + } + + /** + * Gets as sPKISexp + * + * @return mixed[] + */ + public function getSPKISexp() + { + return $this->sPKISexp; + } + + /** + * Sets a new sPKISexp + * + * @param mixed $sPKISexp + * @return self + */ + public function setSPKISexp(array $sPKISexp) + { + $this->sPKISexp = $sPKISexp; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/Signature.php b/src/WssWsSecurity/XmlSign/Signature.php new file mode 100644 index 0000000..05afb80 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/Signature.php @@ -0,0 +1,13 @@ +algorithm; + } + + /** + * Sets a new algorithm + * + * @param string $algorithm + * @return self + */ + public function setAlgorithm($algorithm) + { + $this->algorithm = $algorithm; + return $this; + } + + /** + * Gets as hMACOutputLength + * + * @return integer + */ + public function getHMACOutputLength() + { + return $this->hMACOutputLength; + } + + /** + * Sets a new hMACOutputLength + * + * @param integer $hMACOutputLength + * @return self + */ + public function setHMACOutputLength($hMACOutputLength) + { + $this->hMACOutputLength = $hMACOutputLength; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SignatureProperties.php b/src/WssWsSecurity/XmlSign/SignatureProperties.php new file mode 100644 index 0000000..d3836e8 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SignatureProperties.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as signatureProperty + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty + * $signatureProperty + */ + public function addToSignatureProperty(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty $signatureProperty) + { + $this->signatureProperty[] = $signatureProperty; + return $this; + } + + /** + * isset signatureProperty + * + * @param scalar $index + * @return boolean + */ + public function issetSignatureProperty($index) + { + return isset($this->signatureProperty[$index]); + } + + /** + * unset signatureProperty + * + * @param scalar $index + * @return void + */ + public function unsetSignatureProperty($index) + { + unset($this->signatureProperty[$index]); + } + + /** + * Gets as signatureProperty + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty[] + */ + public function getSignatureProperty() + { + return $this->signatureProperty; + } + + /** + * Sets a new signatureProperty + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty[] + * $signatureProperty + * @return self + */ + public function setSignatureProperty(array $signatureProperty) + { + $this->signatureProperty = $signatureProperty; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SignatureProperty.php b/src/WssWsSecurity/XmlSign/SignatureProperty.php new file mode 100644 index 0000000..de83783 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SignatureProperty.php @@ -0,0 +1,13 @@ +target; + } + + /** + * Sets a new target + * + * @param string $target + * @return self + */ + public function setTarget($target) + { + $this->target = $target; + return $this; + } + + /** + * Gets as id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SignatureType.php b/src/WssWsSecurity/XmlSign/SignatureType.php new file mode 100644 index 0000000..e90a6d9 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SignatureType.php @@ -0,0 +1,205 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Gets as signedInfo + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo + */ + public function getSignedInfo() + { + return $this->signedInfo; + } + + /** + * Sets a new signedInfo + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo + * $signedInfo + * @return self + */ + public function setSignedInfo(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo $signedInfo) + { + $this->signedInfo = $signedInfo; + return $this; + } + + /** + * Gets as signatureValue + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue + */ + public function getSignatureValue() + { + return $this->signatureValue; + } + + /** + * Sets a new signatureValue + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue + * $signatureValue + * @return self + */ + public function setSignatureValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue $signatureValue) + { + $this->signatureValue = $signatureValue; + return $this; + } + + /** + * Gets as keyInfo + * + * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo + */ + public function getKeyInfo() + { + return $this->keyInfo; + } + + /** + * Sets a new keyInfo + * + * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo + * $keyInfo + * @return self + */ + public function setKeyInfo(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo $keyInfo) + { + $this->keyInfo = $keyInfo; + return $this; + } + + /** + * Adds as object + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd + * $object + */ + public function addToObject(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd $object) + { + $this->object[] = $object; + return $this; + } + + /** + * isset object + * + * @param scalar $index + * @return boolean + */ + public function issetObject($index) + { + return isset($this->object[$index]); + } + + /** + * unset object + * + * @param scalar $index + * @return void + */ + public function unsetObject($index) + { + unset($this->object[$index]); + } + + /** + * Gets as object + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd[] + */ + public function getObject() + { + return $this->object; + } + + /** + * Sets a new object + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd[] + * $object + * @return self + */ + public function setObject(array $object) + { + $this->object = $object; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SignatureValue.php b/src/WssWsSecurity/XmlSign/SignatureValue.php new file mode 100644 index 0000000..1a65a2b --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SignatureValue.php @@ -0,0 +1,13 @@ +value($value); + } + + /** + * Gets or sets the inner value + * + * @param mixed $value + * @return mixed + */ + public function value() + { + if ($args = func_get_args()) { + $this->__value = $args[0]; + } + return $this->__value; + } + + /** + * Gets a string value + * + * @return string + */ + public function __toString() + { + return strval($this->__value); + } + + /** + * Gets as id + * + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/SignedInfo.php b/src/WssWsSecurity/XmlSign/SignedInfo.php new file mode 100644 index 0000000..ecd6260 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/SignedInfo.php @@ -0,0 +1,13 @@ +id; + } + + /** + * Sets a new id + * + * @param string $id + * @return self + */ + public function setId($id) + { + $this->id = $id; + return $this; + } + + /** + * Gets as canonicalizationMethod + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod + */ + public function getCanonicalizationMethod() + { + return $this->canonicalizationMethod; + } + + /** + * Sets a new canonicalizationMethod + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod + * $canonicalizationMethod + * @return self + */ + public function setCanonicalizationMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod $canonicalizationMethod) + { + $this->canonicalizationMethod = $canonicalizationMethod; + return $this; + } + + /** + * Gets as signatureMethod + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod + */ + public function getSignatureMethod() + { + return $this->signatureMethod; + } + + /** + * Sets a new signatureMethod + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod + * $signatureMethod + * @return self + */ + public function setSignatureMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod $signatureMethod) + { + $this->signatureMethod = $signatureMethod; + return $this; + } + + /** + * Adds as reference + * + * @return self + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference + * $reference + */ + public function addToReference(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference $reference) + { + $this->reference[] = $reference; + return $this; + } + + /** + * isset reference + * + * @param scalar $index + * @return boolean + */ + public function issetReference($index) + { + return isset($this->reference[$index]); + } + + /** + * unset reference + * + * @param scalar $index + * @return void + */ + public function unsetReference($index) + { + unset($this->reference[$index]); + } + + /** + * Gets as reference + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] + */ + public function getReference() + { + return $this->reference; + } + + /** + * Sets a new reference + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] + * $reference + * @return self + */ + public function setReference(array $reference) + { + $this->reference = $reference; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/Transform.php b/src/WssWsSecurity/XmlSign/Transform.php new file mode 100644 index 0000000..7ea687b --- /dev/null +++ b/src/WssWsSecurity/XmlSign/Transform.php @@ -0,0 +1,13 @@ +algorithm; + } + + /** + * Sets a new algorithm + * + * @param string $algorithm + * @return self + */ + public function setAlgorithm($algorithm) + { + $this->algorithm = $algorithm; + return $this; + } + + /** + * Adds as xPath + * + * @return self + * @param string $xPath + */ + public function addToXPath($xPath) + { + $this->xPath[] = $xPath; + return $this; + } + + /** + * isset xPath + * + * @param scalar $index + * @return boolean + */ + public function issetXPath($index) + { + return isset($this->xPath[$index]); + } + + /** + * unset xPath + * + * @param scalar $index + * @return void + */ + public function unsetXPath($index) + { + unset($this->xPath[$index]); + } + + /** + * Gets as xPath + * + * @return string[] + */ + public function getXPath() + { + return $this->xPath; + } + + /** + * Sets a new xPath + * + * @param string[] $xPath + * @return self + */ + public function setXPath(array $xPath) + { + $this->xPath = $xPath; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/Transforms.php b/src/WssWsSecurity/XmlSign/Transforms.php new file mode 100644 index 0000000..4e41050 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/Transforms.php @@ -0,0 +1,13 @@ +transform[] = $transform; + return $this; + } + + /** + * isset transform + * + * @param scalar $index + * @return boolean + */ + public function issetTransform($index) + { + return isset($this->transform[$index]); + } + + /** + * unset transform + * + * @param scalar $index + * @return void + */ + public function unsetTransform($index) + { + unset($this->transform[$index]); + } + + /** + * Gets as transform + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + */ + public function getTransform() + { + return $this->transform; + } + + /** + * Sets a new transform + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] + * $transform + * @return self + */ + public function setTransform(array $transform) + { + $this->transform = $transform; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/X509Data.php b/src/WssWsSecurity/XmlSign/X509Data.php new file mode 100644 index 0000000..57ad629 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/X509Data.php @@ -0,0 +1,13 @@ +x509IssuerSerial[] = $x509IssuerSerial; + return $this; + } + + /** + * isset x509IssuerSerial + * + * @param scalar $index + * @return boolean + */ + public function issetX509IssuerSerial($index) + { + return isset($this->x509IssuerSerial[$index]); + } + + /** + * unset x509IssuerSerial + * + * @param scalar $index + * @return void + */ + public function unsetX509IssuerSerial($index) + { + unset($this->x509IssuerSerial[$index]); + } + + /** + * Gets as x509IssuerSerial + * + * @return + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType[] + */ + public function getX509IssuerSerial() + { + return $this->x509IssuerSerial; + } + + /** + * Sets a new x509IssuerSerial + * + * @param + * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType[] + * $x509IssuerSerial + * @return self + */ + public function setX509IssuerSerial(array $x509IssuerSerial) + { + $this->x509IssuerSerial = $x509IssuerSerial; + return $this; + } + + /** + * Adds as x509SKI + * + * @return self + * @param mixed $x509SKI + */ + public function addToX509SKI($x509SKI) + { + $this->x509SKI[] = $x509SKI; + return $this; + } + + /** + * isset x509SKI + * + * @param scalar $index + * @return boolean + */ + public function issetX509SKI($index) + { + return isset($this->x509SKI[$index]); + } + + /** + * unset x509SKI + * + * @param scalar $index + * @return void + */ + public function unsetX509SKI($index) + { + unset($this->x509SKI[$index]); + } + + /** + * Gets as x509SKI + * + * @return mixed[] + */ + public function getX509SKI() + { + return $this->x509SKI; + } + + /** + * Sets a new x509SKI + * + * @param mixed $x509SKI + * @return self + */ + public function setX509SKI(array $x509SKI) + { + $this->x509SKI = $x509SKI; + return $this; + } + + /** + * Adds as x509SubjectName + * + * @return self + * @param string $x509SubjectName + */ + public function addToX509SubjectName($x509SubjectName) + { + $this->x509SubjectName[] = $x509SubjectName; + return $this; + } + + /** + * isset x509SubjectName + * + * @param scalar $index + * @return boolean + */ + public function issetX509SubjectName($index) + { + return isset($this->x509SubjectName[$index]); + } + + /** + * unset x509SubjectName + * + * @param scalar $index + * @return void + */ + public function unsetX509SubjectName($index) + { + unset($this->x509SubjectName[$index]); + } + + /** + * Gets as x509SubjectName + * + * @return string[] + */ + public function getX509SubjectName() + { + return $this->x509SubjectName; + } + + /** + * Sets a new x509SubjectName + * + * @param string[] $x509SubjectName + * @return self + */ + public function setX509SubjectName(array $x509SubjectName) + { + $this->x509SubjectName = $x509SubjectName; + return $this; + } + + /** + * Adds as x509Certificate + * + * @return self + * @param mixed $x509Certificate + */ + public function addToX509Certificate($x509Certificate) + { + $this->x509Certificate[] = $x509Certificate; + return $this; + } + + /** + * isset x509Certificate + * + * @param scalar $index + * @return boolean + */ + public function issetX509Certificate($index) + { + return isset($this->x509Certificate[$index]); + } + + /** + * unset x509Certificate + * + * @param scalar $index + * @return void + */ + public function unsetX509Certificate($index) + { + unset($this->x509Certificate[$index]); + } + + /** + * Gets as x509Certificate + * + * @return mixed[] + */ + public function getX509Certificate() + { + return $this->x509Certificate; + } + + /** + * Sets a new x509Certificate + * + * @param mixed $x509Certificate + * @return self + */ + public function setX509Certificate(array $x509Certificate) + { + $this->x509Certificate = $x509Certificate; + return $this; + } + + /** + * Adds as x509CRL + * + * @return self + * @param mixed $x509CRL + */ + public function addToX509CRL($x509CRL) + { + $this->x509CRL[] = $x509CRL; + return $this; + } + + /** + * isset x509CRL + * + * @param scalar $index + * @return boolean + */ + public function issetX509CRL($index) + { + return isset($this->x509CRL[$index]); + } + + /** + * unset x509CRL + * + * @param scalar $index + * @return void + */ + public function unsetX509CRL($index) + { + unset($this->x509CRL[$index]); + } + + /** + * Gets as x509CRL + * + * @return mixed[] + */ + public function getX509CRL() + { + return $this->x509CRL; + } + + /** + * Sets a new x509CRL + * + * @param mixed $x509CRL + * @return self + */ + public function setX509CRL(array $x509CRL) + { + $this->x509CRL = $x509CRL; + return $this; + } + + /** + * Adds as array + * + * @return self + * @param mixed $array + */ + public function addToAnyElement($array) + { + $this->anyElement[] = $array; + return $this; + } + + /** + * isset anyElement + * + * @param scalar $index + * @return boolean + */ + public function issetAnyElement($index) + { + return isset($this->anyElement[$index]); + } + + /** + * unset anyElement + * + * @param scalar $index + * @return void + */ + public function unsetAnyElement($index) + { + unset($this->anyElement[$index]); + } + + /** + * Gets as anyElement + * + * @return mixed[] + */ + public function getAnyElement() + { + return $this->anyElement; + } + + /** + * Sets a new anyElement + * + * @param mixed[] $anyElement + * @return self + */ + public function setAnyElement(array $anyElement) + { + $this->anyElement = $anyElement; + return $this; + } + + +} + diff --git a/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php b/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php new file mode 100644 index 0000000..8e99d95 --- /dev/null +++ b/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php @@ -0,0 +1,70 @@ +x509IssuerName; + } + + /** + * Sets a new x509IssuerName + * + * @param string $x509IssuerName + * @return self + */ + public function setX509IssuerName($x509IssuerName) + { + $this->x509IssuerName = $x509IssuerName; + return $this; + } + + /** + * Gets as x509SerialNumber + * + * @return integer + */ + public function getX509SerialNumber() + { + return $this->x509SerialNumber; + } + + /** + * Sets a new x509SerialNumber + * + * @param integer $x509SerialNumber + * @return self + */ + public function setX509SerialNumber($x509SerialNumber) + { + $this->x509SerialNumber = $x509SerialNumber; + return $this; + } + + +} + diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index f517f85..1f3ee7b 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -44,7 +44,7 @@ public function setUp() } - public function testFault12() + public function testSerializeSecurity() { $wssec = new Security(); $wssec->setUsername('foo'); @@ -66,7 +66,30 @@ public function testFault12() ', $xml); + } + public function testUnserialize() + { + $wssec = new Security(); + $wssec->setUsername('foo'); + $wssec->setPassword('bar'); + $wssec->setTimestamp(new \DateTime('2010-01-01 00:00:00', new \DateTimeZone('UTC'))); + + $xml = $this->serializer->serialize($wssec, 'xml'); + + $this->assertXmlStringEqualsXmlString(' + + + + + + + + + + + + ', $xml); } From 6bdda5ee73c623621985505100e748e7a4b15377 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 17:17:09 +0100 Subject: [PATCH 04/17] WS client request working --- phpunit.xml.dist | 14 +- .../Headers/Handler/HeaderHandler.php | 12 +- src/DependencyInjection/Configuration.php | 7 +- .../SoapClientExtension.php | 15 + .../Secext.AttributedStringType.yml | 19 - .../Secext.BinarySecurityToken.yml | 3 - .../Secext.BinarySecurityTokenType.yml | 11 - .../wss-ws-security/Secext.Embedded.yml | 3 - .../wss-ws-security/Secext.EmbeddedType.yml | 15 - .../Secext.EncodedStringType.yml | 11 - .../wss-ws-security/Secext.KeyIdentifier.yml | 3 - .../Secext.KeyIdentifierType.yml | 11 - .../metadata/wss-ws-security/Secext.Nonce.yml | 3 - .../wss-ws-security/Secext.Password.yml | 3 - .../Secext.PasswordStringType.yml | 11 - .../wss-ws-security/Secext.Reference.yml | 3 - .../wss-ws-security/Secext.ReferenceType.yml | 22 - .../wss-ws-security/Secext.Security.yml | 3 - .../Secext.SecurityHeaderType.yml | 6 - .../Secext.SecurityTokenReference.yml | 3 - .../Secext.SecurityTokenReferenceType.yml | 28 - .../Secext.TransformationParameters.yml | 3 - .../Secext.TransformationParametersType.yml | 6 - .../wss-ws-security/Secext.UsernameToken.yml | 3 - .../Secext.UsernameTokenType.yml | 25 - .../Utility.AttributedDateTimeType.yml | 19 - .../Utility.AttributedURIType.yml | 19 - .../wss-ws-security/Utility.Created.yml | 3 - .../wss-ws-security/Utility.Expires.yml | 3 - .../wss-ws-security/Utility.Timestamp.yml | 3 - .../wss-ws-security/Utility.TimestampType.yml | 33 -- .../XmlSign.CanonicalizationMethod.yml | 3 - .../XmlSign.CanonicalizationMethodType.yml | 13 - .../wss-ws-security/XmlSign.DSAKeyValue.yml | 3 - .../XmlSign.DSAKeyValueType.yml | 72 --- .../wss-ws-security/XmlSign.DigestMethod.yml | 3 - .../XmlSign.DigestMethodType.yml | 13 - .../wss-ws-security/XmlSign.DigestValue.yml | 12 - .../wss-ws-security/XmlSign.KeyInfo.yml | 3 - .../wss-ws-security/XmlSign.KeyInfoType.yml | 111 ---- .../wss-ws-security/XmlSign.KeyName.yml | 12 - .../wss-ws-security/XmlSign.KeyValue.yml | 3 - .../wss-ws-security/XmlSign.KeyValueType.yml | 24 - .../wss-ws-security/XmlSign.Manifest.yml | 3 - .../wss-ws-security/XmlSign.ManifestType.yml | 25 - .../wss-ws-security/XmlSign.MgmtData.yml | 12 - .../wss-ws-security/XmlSign.ObjectType.yml | 31 - .../wss-ws-security/XmlSign.ObjectXsd.yml | 3 - .../wss-ws-security/XmlSign.PGPData.yml | 3 - .../wss-ws-security/XmlSign.PGPDataType.yml | 24 - .../wss-ws-security/XmlSign.RSAKeyValue.yml | 3 - .../XmlSign.RSAKeyValueType.yml | 22 - .../wss-ws-security/XmlSign.Reference.yml | 3 - .../wss-ws-security/XmlSign.ReferenceType.yml | 63 -- .../XmlSign.RetrievalMethod.yml | 3 - .../XmlSign.RetrievalMethodType.yml | 34 -- .../wss-ws-security/XmlSign.SPKIData.yml | 3 - .../wss-ws-security/XmlSign.SPKIDataType.yml | 18 - .../wss-ws-security/XmlSign.Signature.yml | 3 - .../XmlSign.SignatureMethod.yml | 3 - .../XmlSign.SignatureMethodType.yml | 23 - .../XmlSign.SignatureProperties.yml | 3 - .../XmlSign.SignaturePropertiesType.yml | 25 - .../XmlSign.SignatureProperty.yml | 3 - .../XmlSign.SignaturePropertyType.yml | 22 - .../wss-ws-security/XmlSign.SignatureType.yml | 55 -- .../XmlSign.SignatureValue.yml | 3 - .../XmlSign.SignatureValueType.yml | 19 - .../wss-ws-security/XmlSign.SignedInfo.yml | 3 - .../XmlSign.SignedInfoType.yml | 45 -- .../wss-ws-security/XmlSign.Transform.yml | 3 - .../wss-ws-security/XmlSign.TransformType.yml | 27 - .../wss-ws-security/XmlSign.Transforms.yml | 3 - .../XmlSign.TransformsType.yml | 16 - .../wss-ws-security/XmlSign.X509Data.yml | 3 - .../wss-ws-security/XmlSign.X509DataType.yml | 74 --- .../XmlSign.X509IssuerSerialType.yml | 22 - .../AbstractWsSecurityFilter.php | 53 ++ .../Secext/AttributedStringType.php | 82 --- .../Secext/BinarySecurityToken.php | 13 - .../Secext/BinarySecurityTokenType.php | 43 -- src/WssWsSecurity/Secext/Embedded.php | 13 - src/WssWsSecurity/Secext/EmbeddedType.php | 169 ------ .../Secext/EncodedStringType.php | 43 -- src/WssWsSecurity/Secext/KeyIdentifier.php | 13 - .../Secext/KeyIdentifierType.php | 43 -- src/WssWsSecurity/Secext/Nonce.php | 13 - src/WssWsSecurity/Secext/Password.php | 13 - .../Secext/PasswordStringType.php | 43 -- src/WssWsSecurity/Secext/Reference.php | 13 - src/WssWsSecurity/Secext/ReferenceType.php | 133 ----- src/WssWsSecurity/Secext/Security.php | 13 - .../Secext/SecurityHeaderType.php | 143 ----- .../Secext/SecurityTokenReference.php | 13 - .../Secext/SecurityTokenReferenceType.php | 230 -------- .../Secext/TransformationParameters.php | 13 - .../Secext/TransformationParametersType.php | 143 ----- src/WssWsSecurity/Secext/UsernameToken.php | 13 - .../Secext/UsernameTokenType.php | 201 ------- src/WssWsSecurity/Security.php | 83 +-- src/WssWsSecurity/SecurityKeyPair.php | 101 ++++ .../Utility/AttributedDateTimeType.php | 83 --- .../Utility/AttributedURIType.php | 83 --- src/WssWsSecurity/Utility/Created.php | 13 - src/WssWsSecurity/Utility/Expires.php | 13 - src/WssWsSecurity/Utility/Timestamp.php | 13 - src/WssWsSecurity/Utility/TimestampType.php | 167 ------ src/WssWsSecurity/WsSecurityFilterRequest.php | 447 ++++++++++++++ .../WsSecurityFilterResponse.php | 117 ++++ .../WssSecurityHeaderEventHandler.php | 70 --- .../WssSecurityHeaderHandler.php | 79 +-- .../XmlSign/CanonicalizationMethod.php | 13 - .../XmlSign/CanonicalizationMethodType.php | 106 ---- src/WssWsSecurity/XmlSign/DSAKeyValue.php | 13 - src/WssWsSecurity/XmlSign/DSAKeyValueType.php | 205 ------- src/WssWsSecurity/XmlSign/DigestMethod.php | 13 - .../XmlSign/DigestMethodType.php | 106 ---- src/WssWsSecurity/XmlSign/DigestValue.php | 52 -- src/WssWsSecurity/XmlSign/KeyInfo.php | 13 - src/WssWsSecurity/XmlSign/KeyInfoType.php | 558 ------------------ src/WssWsSecurity/XmlSign/KeyName.php | 52 -- src/WssWsSecurity/XmlSign/KeyValue.php | 13 - src/WssWsSecurity/XmlSign/KeyValueType.php | 143 ----- src/WssWsSecurity/XmlSign/Manifest.php | 13 - src/WssWsSecurity/XmlSign/ManifestType.php | 111 ---- src/WssWsSecurity/XmlSign/MgmtData.php | 52 -- src/WssWsSecurity/XmlSign/ObjectType.php | 160 ----- src/WssWsSecurity/XmlSign/ObjectXsd.php | 13 - src/WssWsSecurity/XmlSign/PGPData.php | 13 - src/WssWsSecurity/XmlSign/PGPDataType.php | 133 ----- src/WssWsSecurity/XmlSign/RSAKeyValue.php | 13 - src/WssWsSecurity/XmlSign/RSAKeyValueType.php | 70 --- src/WssWsSecurity/XmlSign/Reference.php | 13 - src/WssWsSecurity/XmlSign/ReferenceType.php | 224 ------- src/WssWsSecurity/XmlSign/RetrievalMethod.php | 13 - .../XmlSign/RetrievalMethodType.php | 138 ----- src/WssWsSecurity/XmlSign/SPKIData.php | 13 - src/WssWsSecurity/XmlSign/SPKIDataType.php | 140 ----- src/WssWsSecurity/XmlSign/Signature.php | 13 - src/WssWsSecurity/XmlSign/SignatureMethod.php | 13 - .../XmlSign/SignatureMethodType.php | 133 ----- .../XmlSign/SignatureProperties.php | 13 - .../XmlSign/SignaturePropertiesType.php | 111 ---- .../XmlSign/SignatureProperty.php | 13 - .../XmlSign/SignaturePropertyType.php | 133 ----- src/WssWsSecurity/XmlSign/SignatureType.php | 205 ------- src/WssWsSecurity/XmlSign/SignatureValue.php | 13 - .../XmlSign/SignatureValueType.php | 82 --- src/WssWsSecurity/XmlSign/SignedInfo.php | 13 - src/WssWsSecurity/XmlSign/SignedInfoType.php | 175 ------ src/WssWsSecurity/XmlSign/Transform.php | 13 - src/WssWsSecurity/XmlSign/TransformType.php | 167 ------ src/WssWsSecurity/XmlSign/Transforms.php | 13 - src/WssWsSecurity/XmlSign/TransformsType.php | 84 --- src/WssWsSecurity/XmlSign/X509Data.php | 13 - src/WssWsSecurity/XmlSign/X509DataType.php | 391 ------------ .../XmlSign/X509IssuerSerialType.php | 70 --- tests/Client/BuildClientTest.php | 14 +- tests/Client/Client12RequestResponsesTest.php | 5 +- tests/Client/ClientRequestResponsesTest.php | 5 +- tests/Fixtures/clientcert.pem | 17 + tests/Fixtures/clientkey.pem | 14 + tests/Fixtures/config.yml | 13 + tests/Fixtures/servercert.pem | 17 + tests/Fixtures/test.wsdl | 314 ++++++---- tests/Serializer/WssSecurityTest.php | 119 ++-- ws-security/config.yml | 16 - ...oasis-200401-wss-wssecurity-secext-1.0.xsd | 195 ------ ...asis-200401-wss-wssecurity-utility-1.0.xsd | 108 ---- ws-security/xmldsig-core-schema.xsd | 318 ---------- 170 files changed, 1123 insertions(+), 8031 deletions(-) delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.Embedded.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.Nonce.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.Password.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.Reference.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.Security.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.Created.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.Expires.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml delete mode 100644 src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml delete mode 100644 src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml create mode 100644 src/WssWsSecurity/AbstractWsSecurityFilter.php delete mode 100644 src/WssWsSecurity/Secext/AttributedStringType.php delete mode 100644 src/WssWsSecurity/Secext/BinarySecurityToken.php delete mode 100644 src/WssWsSecurity/Secext/BinarySecurityTokenType.php delete mode 100644 src/WssWsSecurity/Secext/Embedded.php delete mode 100644 src/WssWsSecurity/Secext/EmbeddedType.php delete mode 100644 src/WssWsSecurity/Secext/EncodedStringType.php delete mode 100644 src/WssWsSecurity/Secext/KeyIdentifier.php delete mode 100644 src/WssWsSecurity/Secext/KeyIdentifierType.php delete mode 100644 src/WssWsSecurity/Secext/Nonce.php delete mode 100644 src/WssWsSecurity/Secext/Password.php delete mode 100644 src/WssWsSecurity/Secext/PasswordStringType.php delete mode 100644 src/WssWsSecurity/Secext/Reference.php delete mode 100644 src/WssWsSecurity/Secext/ReferenceType.php delete mode 100644 src/WssWsSecurity/Secext/Security.php delete mode 100644 src/WssWsSecurity/Secext/SecurityHeaderType.php delete mode 100644 src/WssWsSecurity/Secext/SecurityTokenReference.php delete mode 100644 src/WssWsSecurity/Secext/SecurityTokenReferenceType.php delete mode 100644 src/WssWsSecurity/Secext/TransformationParameters.php delete mode 100644 src/WssWsSecurity/Secext/TransformationParametersType.php delete mode 100644 src/WssWsSecurity/Secext/UsernameToken.php delete mode 100644 src/WssWsSecurity/Secext/UsernameTokenType.php create mode 100644 src/WssWsSecurity/SecurityKeyPair.php delete mode 100644 src/WssWsSecurity/Utility/AttributedDateTimeType.php delete mode 100644 src/WssWsSecurity/Utility/AttributedURIType.php delete mode 100644 src/WssWsSecurity/Utility/Created.php delete mode 100644 src/WssWsSecurity/Utility/Expires.php delete mode 100644 src/WssWsSecurity/Utility/Timestamp.php delete mode 100644 src/WssWsSecurity/Utility/TimestampType.php create mode 100644 src/WssWsSecurity/WsSecurityFilterRequest.php create mode 100644 src/WssWsSecurity/WsSecurityFilterResponse.php delete mode 100644 src/WssWsSecurity/WssSecurityHeaderEventHandler.php delete mode 100644 src/WssWsSecurity/XmlSign/CanonicalizationMethod.php delete mode 100644 src/WssWsSecurity/XmlSign/CanonicalizationMethodType.php delete mode 100644 src/WssWsSecurity/XmlSign/DSAKeyValue.php delete mode 100644 src/WssWsSecurity/XmlSign/DSAKeyValueType.php delete mode 100644 src/WssWsSecurity/XmlSign/DigestMethod.php delete mode 100644 src/WssWsSecurity/XmlSign/DigestMethodType.php delete mode 100644 src/WssWsSecurity/XmlSign/DigestValue.php delete mode 100644 src/WssWsSecurity/XmlSign/KeyInfo.php delete mode 100644 src/WssWsSecurity/XmlSign/KeyInfoType.php delete mode 100644 src/WssWsSecurity/XmlSign/KeyName.php delete mode 100644 src/WssWsSecurity/XmlSign/KeyValue.php delete mode 100644 src/WssWsSecurity/XmlSign/KeyValueType.php delete mode 100644 src/WssWsSecurity/XmlSign/Manifest.php delete mode 100644 src/WssWsSecurity/XmlSign/ManifestType.php delete mode 100644 src/WssWsSecurity/XmlSign/MgmtData.php delete mode 100644 src/WssWsSecurity/XmlSign/ObjectType.php delete mode 100644 src/WssWsSecurity/XmlSign/ObjectXsd.php delete mode 100644 src/WssWsSecurity/XmlSign/PGPData.php delete mode 100644 src/WssWsSecurity/XmlSign/PGPDataType.php delete mode 100644 src/WssWsSecurity/XmlSign/RSAKeyValue.php delete mode 100644 src/WssWsSecurity/XmlSign/RSAKeyValueType.php delete mode 100644 src/WssWsSecurity/XmlSign/Reference.php delete mode 100644 src/WssWsSecurity/XmlSign/ReferenceType.php delete mode 100644 src/WssWsSecurity/XmlSign/RetrievalMethod.php delete mode 100644 src/WssWsSecurity/XmlSign/RetrievalMethodType.php delete mode 100644 src/WssWsSecurity/XmlSign/SPKIData.php delete mode 100644 src/WssWsSecurity/XmlSign/SPKIDataType.php delete mode 100644 src/WssWsSecurity/XmlSign/Signature.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureMethod.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureMethodType.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureProperties.php delete mode 100644 src/WssWsSecurity/XmlSign/SignaturePropertiesType.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureProperty.php delete mode 100644 src/WssWsSecurity/XmlSign/SignaturePropertyType.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureType.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureValue.php delete mode 100644 src/WssWsSecurity/XmlSign/SignatureValueType.php delete mode 100644 src/WssWsSecurity/XmlSign/SignedInfo.php delete mode 100644 src/WssWsSecurity/XmlSign/SignedInfoType.php delete mode 100644 src/WssWsSecurity/XmlSign/Transform.php delete mode 100644 src/WssWsSecurity/XmlSign/TransformType.php delete mode 100644 src/WssWsSecurity/XmlSign/Transforms.php delete mode 100644 src/WssWsSecurity/XmlSign/TransformsType.php delete mode 100644 src/WssWsSecurity/XmlSign/X509Data.php delete mode 100644 src/WssWsSecurity/XmlSign/X509DataType.php delete mode 100644 src/WssWsSecurity/XmlSign/X509IssuerSerialType.php create mode 100644 tests/Fixtures/clientcert.pem create mode 100644 tests/Fixtures/clientkey.pem create mode 100644 tests/Fixtures/servercert.pem delete mode 100644 ws-security/config.yml delete mode 100644 ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd delete mode 100644 ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd delete mode 100644 ws-security/xmldsig-core-schema.xsd diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ab62156..44dfb05 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,12 +22,14 @@ - - - src - - - + + + src + + src/WssWsSecurity/XmlSign + + + diff --git a/src/Arguments/Headers/Handler/HeaderHandler.php b/src/Arguments/Headers/Handler/HeaderHandler.php index 10d1e63..ed66589 100644 --- a/src/Arguments/Headers/Handler/HeaderHandler.php +++ b/src/Arguments/Headers/Handler/HeaderHandler.php @@ -12,9 +12,6 @@ class HeaderHandler implements SubscribingHandlerInterface { - const SOAP = 'http://schemas.xmlsoap.org/soap/envelope/'; - const SOAP_12 = 'http://www.w3.org/2003/05/soap-envelope'; - protected $headerData = []; public static function getSubscribingMethods() @@ -66,7 +63,7 @@ public function serializeHeader(XmlSerializationVisitor $visitor, HeaderPlacehol $metadata = new StaticPropertyMetadata($classMetadata->name, $classMetadata->xmlRootName, $header->getData()); $metadata->xmlNamespace = $classMetadata->xmlRootNamespace; - $metadata->serializedName = $classMetadata->xmlRootName; + $metadata->serializedName = $classMetadata->xmlRootName ?: 'header'; $visitor->visitProperty($metadata, $header->getData(), $context); @@ -87,12 +84,7 @@ private function handleOptions(XmlSerializationVisitor $visitor, $header) foreach ($options as $option => $value) { if (in_array($option, ['mustUnderstand', 'required', 'role', 'actor'])) { - if ($currentNode->ownerDocument->documentElement->namespaceURI === self::SOAP_12) { - $envelopeNS = self::SOAP_12; - } else { - $envelopeNS = self::SOAP; - } - $this->setAttributeOnNode($currentNode->lastChild, $option, $value, $envelopeNS); + $this->setAttributeOnNode($currentNode->lastChild, $option, $value, $currentNode->ownerDocument->documentElement->namespaceURI); } } } diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 1c7483b..1969d6a 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -83,7 +83,12 @@ public function getConfigTreeBuilder() ->prototype('scalar')->end() ->end() - + ->scalarNode('any_element') + ->defaultValue(false) + ->end() + ->scalarNode('any_attribute') + ->defaultValue(false) + ->end() diff --git a/src/DependencyInjection/SoapClientExtension.php b/src/DependencyInjection/SoapClientExtension.php index 3b01419..dff84c8 100644 --- a/src/DependencyInjection/SoapClientExtension.php +++ b/src/DependencyInjection/SoapClientExtension.php @@ -42,7 +42,17 @@ public function load(array $configs, ContainerBuilder $container) foreach (['php', 'jms'] as $type) { + $converter = $container->getDefinition('goetas_webservices.xsd2php.converter.' . $type); + + $converter->addMethodCall('setOutputAnyAttribute', [$config['any_attribute']]); + $converter->addMethodCall('setOutputAnyElement', [$config['any_element']]); + + $converterWsdl = $container->getDefinition('goetas_webservices.wsdl2php.converter.' . $type); + + $converterWsdl->addMethodCall('setOutputAnyAttribute', [$config['any_attribute']]); + $converterWsdl->addMethodCall('setOutputAnyElement', [$config['any_element']]); + foreach ($config['namespaces'] as $xml => $php) { $converter->addMethodCall('addNamespace', [$xml, self::sanitizePhp($php)]); } @@ -53,6 +63,11 @@ public function load(array $configs, ContainerBuilder $container) } } + $schemaReader = $container->getDefinition('goetas_webservices.xsd2php.schema_reader'); + foreach ($config['known_locations'] as $namespace => $location) { + $schemaReader->addMethodCall('addKnownSchemaLocation', [$namespace, $location]); + } + $definition = $container->getDefinition('goetas_webservices.xsd2php.naming_convention.' . $config['naming_strategy']); $container->setDefinition('goetas_webservices.xsd2php.naming_convention', $definition); diff --git a/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml deleted file mode 100644 index 73be395..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.AttributedStringType.yml +++ /dev/null @@ -1,19 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType: - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: string - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml deleted file mode 100644 index 5492b45..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityToken.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\BinarySecurityToken: - xml_root_name: BinarySecurityToken - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml b/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml deleted file mode 100644 index 2bff300..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.BinarySecurityTokenType.yml +++ /dev/null @@ -1,11 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\BinarySecurityTokenType: - properties: - valueType: - expose: true - access_type: public_method - serialized_name: ValueType - accessor: - getter: getValueType - setter: setValueType - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml b/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml deleted file mode 100644 index 3049c53..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.Embedded.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Embedded: - xml_root_name: Embedded - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml b/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml deleted file mode 100644 index a39bd45..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.EmbeddedType.yml +++ /dev/null @@ -1,15 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\EmbeddedType: - properties: - valueType: - expose: true - access_type: public_method - serialized_name: ValueType - accessor: - getter: getValueType - setter: setValueType - xml_attribute: true - type: string - anyAttribute: - exclude: true - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml deleted file mode 100644 index a72610b..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.EncodedStringType.yml +++ /dev/null @@ -1,11 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\EncodedStringType: - properties: - encodingType: - expose: true - access_type: public_method - serialized_name: EncodingType - accessor: - getter: getEncodingType - setter: setEncodingType - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml deleted file mode 100644 index f96999a..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifier.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\KeyIdentifier: - xml_root_name: KeyIdentifier - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml b/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml deleted file mode 100644 index fd71202..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.KeyIdentifierType.yml +++ /dev/null @@ -1,11 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\KeyIdentifierType: - properties: - valueType: - expose: true - access_type: public_method - serialized_name: ValueType - accessor: - getter: getValueType - setter: setValueType - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml b/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml deleted file mode 100644 index 220dd32..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.Nonce.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Nonce: - xml_root_name: Nonce - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.Password.yml b/src/Resources/metadata/wss-ws-security/Secext.Password.yml deleted file mode 100644 index faf00a2..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.Password.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Password: - xml_root_name: Password - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml b/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml deleted file mode 100644 index 3fb9dec..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.PasswordStringType.yml +++ /dev/null @@ -1,11 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\PasswordStringType: - properties: - type: - expose: true - access_type: public_method - serialized_name: Type - accessor: - getter: getType - setter: setType - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Secext.Reference.yml b/src/Resources/metadata/wss-ws-security/Secext.Reference.yml deleted file mode 100644 index a1dcdc1..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.Reference.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Reference: - xml_root_name: Reference - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml b/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml deleted file mode 100644 index 3d9f29d..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.ReferenceType.yml +++ /dev/null @@ -1,22 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\ReferenceType: - properties: - uRI: - expose: true - access_type: public_method - serialized_name: URI - accessor: - getter: getURI - setter: setURI - xml_attribute: true - type: string - valueType: - expose: true - access_type: public_method - serialized_name: ValueType - accessor: - getter: getValueType - setter: setValueType - xml_attribute: true - type: string - anyAttribute: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.Security.yml b/src/Resources/metadata/wss-ws-security/Secext.Security.yml deleted file mode 100644 index b50cb57..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.Security.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\Security: - xml_root_name: Security - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml deleted file mode 100644 index 8fe8118..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.SecurityHeaderType.yml +++ /dev/null @@ -1,6 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityHeaderType: - properties: - anyAttribute: - exclude: true - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml deleted file mode 100644 index 0f64d28..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReference.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityTokenReference: - xml_root_name: SecurityTokenReference - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml b/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml deleted file mode 100644 index 4b9c823..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.SecurityTokenReferenceType.yml +++ /dev/null @@ -1,28 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\SecurityTokenReferenceType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - usage: - expose: true - access_type: public_method - serialized_name: Usage - accessor: - getter: getUsage - setter: setUsage - xml_attribute: true - type: GoetasWebservices\Xsd\XsdToPhp\Jms\SimpleListOf - xml_list: - inline: false - entry_name: anyURI - entry_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' - anyAttribute: - exclude: true - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml b/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml deleted file mode 100644 index 670f37c..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.TransformationParameters.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\TransformationParameters: - xml_root_name: TransformationParameters - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml b/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml deleted file mode 100644 index 8f2f81f..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.TransformationParametersType.yml +++ /dev/null @@ -1,6 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\TransformationParametersType: - properties: - anyAttribute: - exclude: true - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml b/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml deleted file mode 100644 index 3825e6f..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.UsernameToken.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\UsernameToken: - xml_root_name: UsernameToken - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml b/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml deleted file mode 100644 index 23fe0e5..0000000 --- a/src/Resources/metadata/wss-ws-security/Secext.UsernameTokenType.yml +++ /dev/null @@ -1,25 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\UsernameTokenType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - anyAttribute: - exclude: true - username: - expose: true - access_type: public_method - serialized_name: Username - xml_element: - namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' - accessor: - getter: getUsername - setter: setUsername - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml b/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml deleted file mode 100644 index a63bcb4..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.AttributedDateTimeType.yml +++ /dev/null @@ -1,19 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\AttributedDateTimeType: - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: string - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml b/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml deleted file mode 100644 index 4ca214e..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.AttributedURIType.yml +++ /dev/null @@ -1,19 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\AttributedURIType: - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: string - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/Utility.Created.yml b/src/Resources/metadata/wss-ws-security/Utility.Created.yml deleted file mode 100644 index 212e0e8..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.Created.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created: - xml_root_name: Created - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.Expires.yml b/src/Resources/metadata/wss-ws-security/Utility.Expires.yml deleted file mode 100644 index 5314160..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.Expires.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires: - xml_root_name: Expires - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml b/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml deleted file mode 100644 index f9757f6..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.Timestamp.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Timestamp: - xml_root_name: Timestamp - xml_root_namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' diff --git a/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml b/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml deleted file mode 100644 index ab2b1a7..0000000 --- a/src/Resources/metadata/wss-ws-security/Utility.TimestampType.yml +++ /dev/null @@ -1,33 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\TimestampType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - created: - expose: true - access_type: public_method - serialized_name: Created - xml_element: - namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' - accessor: - getter: getCreated - setter: setCreated - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created - expires: - expose: true - access_type: public_method - serialized_name: Expires - xml_element: - namespace: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' - accessor: - getter: getExpires - setter: setExpires - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml deleted file mode 100644 index 52b1706..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethod.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod: - xml_root_name: CanonicalizationMethod - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml deleted file mode 100644 index 6992ab7..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.CanonicalizationMethodType.yml +++ /dev/null @@ -1,13 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethodType: - properties: - algorithm: - expose: true - access_type: public_method - serialized_name: Algorithm - accessor: - getter: getAlgorithm - setter: setAlgorithm - xml_attribute: true - type: string - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml deleted file mode 100644 index 3a05ce5..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValue.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue: - xml_root_name: DSAKeyValue - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml deleted file mode 100644 index 28b01ab..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.DSAKeyValueType.yml +++ /dev/null @@ -1,72 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValueType: - properties: - p: - expose: true - access_type: public_method - serialized_name: P - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getP - setter: setP - type: \AnySimpleType - q: - expose: true - access_type: public_method - serialized_name: Q - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getQ - setter: setQ - type: \AnySimpleType - g: - expose: true - access_type: public_method - serialized_name: G - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getG - setter: setG - type: \AnySimpleType - y: - expose: true - access_type: public_method - serialized_name: Y - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getY - setter: setY - type: \AnySimpleType - j: - expose: true - access_type: public_method - serialized_name: J - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getJ - setter: setJ - type: \AnySimpleType - seed: - expose: true - access_type: public_method - serialized_name: Seed - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSeed - setter: setSeed - type: \AnySimpleType - pgenCounter: - expose: true - access_type: public_method - serialized_name: PgenCounter - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getPgenCounter - setter: setPgenCounter - type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml deleted file mode 100644 index f2e1a5a..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethod.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod: - xml_root_name: DigestMethod - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml deleted file mode 100644 index 116dc0f..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.DigestMethodType.yml +++ /dev/null @@ -1,13 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethodType: - properties: - algorithm: - expose: true - access_type: public_method - serialized_name: Algorithm - accessor: - getter: getAlgorithm - setter: setAlgorithm - xml_attribute: true - type: string - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml deleted file mode 100644 index 51b2205..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.DigestValue.yml +++ /dev/null @@ -1,12 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestValue: - xml_root_name: DigestValue - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml deleted file mode 100644 index 4dc109f..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfo.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo: - xml_root_name: KeyInfo - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml deleted file mode 100644 index ea8794c..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.KeyInfoType.yml +++ /dev/null @@ -1,111 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfoType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - keyName: - expose: true - access_type: public_method - serialized_name: KeyName - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getKeyName - setter: setKeyName - xml_list: - inline: true - entry_name: KeyName - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - keyValue: - expose: true - access_type: public_method - serialized_name: KeyValue - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getKeyValue - setter: setKeyValue - xml_list: - inline: true - entry_name: KeyValue - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - retrievalMethod: - expose: true - access_type: public_method - serialized_name: RetrievalMethod - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getRetrievalMethod - setter: setRetrievalMethod - xml_list: - inline: true - entry_name: RetrievalMethod - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - x509Data: - expose: true - access_type: public_method - serialized_name: X509Data - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509Data - setter: setX509Data - xml_list: - inline: true - entry_name: X509Data - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - pGPData: - expose: true - access_type: public_method - serialized_name: PGPData - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getPGPData - setter: setPGPData - xml_list: - inline: true - entry_name: PGPData - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - sPKIData: - expose: true - access_type: public_method - serialized_name: SPKIData - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSPKIData - setter: setSPKIData - type: array<\AnySimpleType> - xml_list: - inline: false - entry_name: SPKISexp - namespace: 'http://www.w3.org/2000/09/xmldsig#' - mgmtData: - expose: true - access_type: public_method - serialized_name: MgmtData - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getMgmtData - setter: setMgmtData - xml_list: - inline: true - entry_name: MgmtData - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml deleted file mode 100644 index 3ad9bb6..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.KeyName.yml +++ /dev/null @@ -1,12 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyName: - xml_root_name: KeyName - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml deleted file mode 100644 index d468522..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValue.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue: - xml_root_name: KeyValue - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml deleted file mode 100644 index 48fc815..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.KeyValueType.yml +++ /dev/null @@ -1,24 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValueType: - properties: - dSAKeyValue: - expose: true - access_type: public_method - serialized_name: DSAKeyValue - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getDSAKeyValue - setter: setDSAKeyValue - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue - rSAKeyValue: - expose: true - access_type: public_method - serialized_name: RSAKeyValue - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getRSAKeyValue - setter: setRSAKeyValue - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml deleted file mode 100644 index 3944649..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.Manifest.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Manifest: - xml_root_name: Manifest - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml deleted file mode 100644 index d443342..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.ManifestType.yml +++ /dev/null @@ -1,25 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ManifestType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - reference: - expose: true - access_type: public_method - serialized_name: Reference - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getReference - setter: setReference - xml_list: - inline: true - entry_name: Reference - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml deleted file mode 100644 index dda9682..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.MgmtData.yml +++ /dev/null @@ -1,12 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\MgmtData: - xml_root_name: MgmtData - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml deleted file mode 100644 index 9cb53c3..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectType.yml +++ /dev/null @@ -1,31 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - mimeType: - expose: true - access_type: public_method - serialized_name: MimeType - accessor: - getter: getMimeType - setter: setMimeType - xml_attribute: true - type: string - encoding: - expose: true - access_type: public_method - serialized_name: Encoding - accessor: - getter: getEncoding - setter: setEncoding - xml_attribute: true - type: string - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml deleted file mode 100644 index b3c9341..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.ObjectXsd.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd: - xml_root_name: Object - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml deleted file mode 100644 index c745f87..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.PGPData.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData: - xml_root_name: PGPData - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml deleted file mode 100644 index 483a0a8..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.PGPDataType.yml +++ /dev/null @@ -1,24 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPDataType: - properties: - pGPKeyID: - expose: true - access_type: public_method - serialized_name: PGPKeyID - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getPGPKeyID - setter: setPGPKeyID - type: \AnySimpleType - pGPKeyPacket: - expose: true - access_type: public_method - serialized_name: PGPKeyPacket - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getPGPKeyPacket - setter: setPGPKeyPacket - type: \AnySimpleType - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml deleted file mode 100644 index a0779f4..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValue.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue: - xml_root_name: RSAKeyValue - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml deleted file mode 100644 index dbd5050..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.RSAKeyValueType.yml +++ /dev/null @@ -1,22 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValueType: - properties: - modulus: - expose: true - access_type: public_method - serialized_name: Modulus - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getModulus - setter: setModulus - type: \AnySimpleType - exponent: - expose: true - access_type: public_method - serialized_name: Exponent - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getExponent - setter: setExponent - type: \AnySimpleType diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml deleted file mode 100644 index b4aee42..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.Reference.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference: - xml_root_name: Reference - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml deleted file mode 100644 index 75bfedb..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.ReferenceType.yml +++ /dev/null @@ -1,63 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ReferenceType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - uRI: - expose: true - access_type: public_method - serialized_name: URI - accessor: - getter: getURI - setter: setURI - xml_attribute: true - type: string - type: - expose: true - access_type: public_method - serialized_name: Type - accessor: - getter: getType - setter: setType - xml_attribute: true - type: string - transforms: - expose: true - access_type: public_method - serialized_name: Transforms - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getTransforms - setter: setTransforms - type: array - xml_list: - inline: false - entry_name: Transform - namespace: 'http://www.w3.org/2000/09/xmldsig#' - digestMethod: - expose: true - access_type: public_method - serialized_name: DigestMethod - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getDigestMethod - setter: setDigestMethod - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod - digestValue: - expose: true - access_type: public_method - serialized_name: DigestValue - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getDigestValue - setter: setDigestValue - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestValue diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml deleted file mode 100644 index 0f91225..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethod.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod: - xml_root_name: RetrievalMethod - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml deleted file mode 100644 index 2af0c76..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.RetrievalMethodType.yml +++ /dev/null @@ -1,34 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethodType: - properties: - uRI: - expose: true - access_type: public_method - serialized_name: URI - accessor: - getter: getURI - setter: setURI - xml_attribute: true - type: string - type: - expose: true - access_type: public_method - serialized_name: Type - accessor: - getter: getType - setter: setType - xml_attribute: true - type: string - transforms: - expose: true - access_type: public_method - serialized_name: Transforms - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getTransforms - setter: setTransforms - type: array - xml_list: - inline: false - entry_name: Transform - namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml deleted file mode 100644 index d1e6d93..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIData.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SPKIData: - xml_root_name: SPKIData - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml deleted file mode 100644 index 2b8a30d..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SPKIDataType.yml +++ /dev/null @@ -1,18 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SPKIDataType: - properties: - sPKISexp: - expose: true - access_type: public_method - serialized_name: SPKISexp - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSPKISexp - setter: setSPKISexp - xml_list: - inline: true - entry_name: SPKISexp - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array<\AnySimpleType> - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml deleted file mode 100644 index 9f98f3e..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.Signature.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Signature: - xml_root_name: Signature - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml deleted file mode 100644 index 787a007..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethod.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod: - xml_root_name: SignatureMethod - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml deleted file mode 100644 index f773e0f..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureMethodType.yml +++ /dev/null @@ -1,23 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethodType: - properties: - algorithm: - expose: true - access_type: public_method - serialized_name: Algorithm - accessor: - getter: getAlgorithm - setter: setAlgorithm - xml_attribute: true - type: string - hMACOutputLength: - expose: true - access_type: public_method - serialized_name: HMACOutputLength - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getHMACOutputLength - setter: setHMACOutputLength - type: integer - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml deleted file mode 100644 index 0131015..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperties.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperties: - xml_root_name: SignatureProperties - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml deleted file mode 100644 index 253f958..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertiesType.yml +++ /dev/null @@ -1,25 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignaturePropertiesType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - signatureProperty: - expose: true - access_type: public_method - serialized_name: SignatureProperty - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSignatureProperty - setter: setSignatureProperty - xml_list: - inline: true - entry_name: SignatureProperty - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml deleted file mode 100644 index 5cee452..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureProperty.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty: - xml_root_name: SignatureProperty - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml deleted file mode 100644 index 3c24d44..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignaturePropertyType.yml +++ /dev/null @@ -1,22 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignaturePropertyType: - properties: - target: - expose: true - access_type: public_method - serialized_name: Target - accessor: - getter: getTarget - setter: setTarget - xml_attribute: true - type: string - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml deleted file mode 100644 index cf3f9b4..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureType.yml +++ /dev/null @@ -1,55 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - signedInfo: - expose: true - access_type: public_method - serialized_name: SignedInfo - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSignedInfo - setter: setSignedInfo - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo - signatureValue: - expose: true - access_type: public_method - serialized_name: SignatureValue - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSignatureValue - setter: setSignatureValue - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue - keyInfo: - expose: true - access_type: public_method - serialized_name: KeyInfo - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getKeyInfo - setter: setKeyInfo - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo - object: - expose: true - access_type: public_method - serialized_name: Object - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getObject - setter: setObject - xml_list: - inline: true - entry_name: Object - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml deleted file mode 100644 index 0fffd1f..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValue.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue: - xml_root_name: SignatureValue - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml deleted file mode 100644 index b806968..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignatureValueType.yml +++ /dev/null @@ -1,19 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValueType: - properties: - __value: - expose: true - xml_value: true - access_type: public_method - accessor: - getter: value - setter: value - type: \AnySimpleType - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml deleted file mode 100644 index 53cdeb0..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfo.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo: - xml_root_name: SignedInfo - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml deleted file mode 100644 index f4d8b8b..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.SignedInfoType.yml +++ /dev/null @@ -1,45 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfoType: - properties: - id: - expose: true - access_type: public_method - serialized_name: Id - accessor: - getter: getId - setter: setId - xml_attribute: true - type: string - canonicalizationMethod: - expose: true - access_type: public_method - serialized_name: CanonicalizationMethod - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getCanonicalizationMethod - setter: setCanonicalizationMethod - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod - signatureMethod: - expose: true - access_type: public_method - serialized_name: SignatureMethod - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getSignatureMethod - setter: setSignatureMethod - type: GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod - reference: - expose: true - access_type: public_method - serialized_name: Reference - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getReference - setter: setReference - xml_list: - inline: true - entry_name: Reference - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml deleted file mode 100644 index 5e35ee7..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.Transform.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform: - xml_root_name: Transform - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml deleted file mode 100644 index afd379f..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.TransformType.yml +++ /dev/null @@ -1,27 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\TransformType: - properties: - algorithm: - expose: true - access_type: public_method - serialized_name: Algorithm - accessor: - getter: getAlgorithm - setter: setAlgorithm - xml_attribute: true - type: string - xPath: - expose: true - access_type: public_method - serialized_name: XPath - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getXPath - setter: setXPath - xml_list: - inline: true - entry_name: XPath - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml b/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml deleted file mode 100644 index 0a1a0a9..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.Transforms.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transforms: - xml_root_name: Transforms - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml deleted file mode 100644 index c7b70ab..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.TransformsType.yml +++ /dev/null @@ -1,16 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\TransformsType: - properties: - transform: - expose: true - access_type: public_method - serialized_name: Transform - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getTransform - setter: setTransform - xml_list: - inline: true - entry_name: Transform - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml deleted file mode 100644 index 6d93800..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.X509Data.yml +++ /dev/null @@ -1,3 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data: - xml_root_name: X509Data - xml_root_namespace: 'http://www.w3.org/2000/09/xmldsig#' diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml deleted file mode 100644 index fc7bd4d..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.X509DataType.yml +++ /dev/null @@ -1,74 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509DataType: - properties: - x509IssuerSerial: - expose: true - access_type: public_method - serialized_name: X509IssuerSerial - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509IssuerSerial - setter: setX509IssuerSerial - xml_list: - inline: true - entry_name: X509IssuerSerial - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - x509SKI: - expose: true - access_type: public_method - serialized_name: X509SKI - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509SKI - setter: setX509SKI - xml_list: - inline: true - entry_name: X509SKI - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array<\AnySimpleType> - x509SubjectName: - expose: true - access_type: public_method - serialized_name: X509SubjectName - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509SubjectName - setter: setX509SubjectName - xml_list: - inline: true - entry_name: X509SubjectName - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array - x509Certificate: - expose: true - access_type: public_method - serialized_name: X509Certificate - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509Certificate - setter: setX509Certificate - xml_list: - inline: true - entry_name: X509Certificate - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array<\AnySimpleType> - x509CRL: - expose: true - access_type: public_method - serialized_name: X509CRL - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509CRL - setter: setX509CRL - xml_list: - inline: true - entry_name: X509CRL - namespace: 'http://www.w3.org/2000/09/xmldsig#' - type: array<\AnySimpleType> - anyElement: - exclude: true diff --git a/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml b/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml deleted file mode 100644 index 72d412a..0000000 --- a/src/Resources/metadata/wss-ws-security/XmlSign.X509IssuerSerialType.yml +++ /dev/null @@ -1,22 +0,0 @@ -GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType: - properties: - x509IssuerName: - expose: true - access_type: public_method - serialized_name: X509IssuerName - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509IssuerName - setter: setX509IssuerName - type: string - x509SerialNumber: - expose: true - access_type: public_method - serialized_name: X509SerialNumber - xml_element: - namespace: 'http://www.w3.org/2000/09/xmldsig#' - accessor: - getter: getX509SerialNumber - setter: setX509SerialNumber - type: integer diff --git a/src/WssWsSecurity/AbstractWsSecurityFilter.php b/src/WssWsSecurity/AbstractWsSecurityFilter.php new file mode 100644 index 0000000..d82bb64 --- /dev/null +++ b/src/WssWsSecurity/AbstractWsSecurityFilter.php @@ -0,0 +1,53 @@ +serviceSecurityKey = $serviceSecurityKey; + } + + /** + * Set user security key. + * + * @param SecurityKeyPair $userSecurityKey User security key + * + * @return void + */ + public function setUserSecurityKeyObject(SecurityKeyPair $userSecurityKey) + { + $this->userSecurityKey = $userSecurityKey; + } +} diff --git a/src/WssWsSecurity/Secext/AttributedStringType.php b/src/WssWsSecurity/Secext/AttributedStringType.php deleted file mode 100644 index 6b0da7a..0000000 --- a/src/WssWsSecurity/Secext/AttributedStringType.php +++ /dev/null @@ -1,82 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param string $value - * @return string - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - /** - * Gets as id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/BinarySecurityToken.php b/src/WssWsSecurity/Secext/BinarySecurityToken.php deleted file mode 100644 index 3d5ae59..0000000 --- a/src/WssWsSecurity/Secext/BinarySecurityToken.php +++ /dev/null @@ -1,13 +0,0 @@ -valueType; - } - - /** - * Sets a new valueType - * - * @param string $valueType - * @return self - */ - public function setValueType($valueType) - { - $this->valueType = $valueType; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/Embedded.php b/src/WssWsSecurity/Secext/Embedded.php deleted file mode 100644 index bda4b3c..0000000 --- a/src/WssWsSecurity/Secext/Embedded.php +++ /dev/null @@ -1,13 +0,0 @@ -valueType; - } - - /** - * Sets a new valueType - * - * @param string $valueType - * @return self - */ - public function setValueType($valueType) - { - $this->valueType = $valueType; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyAttribute($array) - { - $this->anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/EncodedStringType.php b/src/WssWsSecurity/Secext/EncodedStringType.php deleted file mode 100644 index 43ab31f..0000000 --- a/src/WssWsSecurity/Secext/EncodedStringType.php +++ /dev/null @@ -1,43 +0,0 @@ -encodingType; - } - - /** - * Sets a new encodingType - * - * @param string $encodingType - * @return self - */ - public function setEncodingType($encodingType) - { - $this->encodingType = $encodingType; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/KeyIdentifier.php b/src/WssWsSecurity/Secext/KeyIdentifier.php deleted file mode 100644 index e1ce430..0000000 --- a/src/WssWsSecurity/Secext/KeyIdentifier.php +++ /dev/null @@ -1,13 +0,0 @@ -valueType; - } - - /** - * Sets a new valueType - * - * @param string $valueType - * @return self - */ - public function setValueType($valueType) - { - $this->valueType = $valueType; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/Nonce.php b/src/WssWsSecurity/Secext/Nonce.php deleted file mode 100644 index da099e4..0000000 --- a/src/WssWsSecurity/Secext/Nonce.php +++ /dev/null @@ -1,13 +0,0 @@ -type; - } - - /** - * Sets a new type - * - * @param string $type - * @return self - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/Reference.php b/src/WssWsSecurity/Secext/Reference.php deleted file mode 100644 index 86b7822..0000000 --- a/src/WssWsSecurity/Secext/Reference.php +++ /dev/null @@ -1,13 +0,0 @@ -uRI; - } - - /** - * Sets a new uRI - * - * @param string $uRI - * @return self - */ - public function setURI($uRI) - { - $this->uRI = $uRI; - return $this; - } - - /** - * Gets as valueType - * - * @return string - */ - public function getValueType() - { - return $this->valueType; - } - - /** - * Sets a new valueType - * - * @param string $valueType - * @return self - */ - public function setValueType($valueType) - { - $this->valueType = $valueType; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyAttribute($array) - { - $this->anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/Security.php b/src/WssWsSecurity/Secext/Security.php deleted file mode 100644 index e68bc39..0000000 --- a/src/WssWsSecurity/Secext/Security.php +++ /dev/null @@ -1,13 +0,0 @@ -anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/SecurityTokenReference.php b/src/WssWsSecurity/Secext/SecurityTokenReference.php deleted file mode 100644 index a6af5b4..0000000 --- a/src/WssWsSecurity/Secext/SecurityTokenReference.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as usage - * - * @return self - * @param string $usage - */ - public function addToUsage($usage) - { - $this->usage[] = $usage; - return $this; - } - - /** - * isset usage - * - * @param scalar $index - * @return boolean - */ - public function issetUsage($index) - { - return isset($this->usage[$index]); - } - - /** - * unset usage - * - * @param scalar $index - * @return void - */ - public function unsetUsage($index) - { - unset($this->usage[$index]); - } - - /** - * Gets as usage - * - * @return string[] - */ - public function getUsage() - { - return $this->usage; - } - - /** - * Sets a new usage - * - * @param string[] $usage - * @return self - */ - public function setUsage(array $usage) - { - $this->usage = $usage; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyAttribute($array) - { - $this->anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/TransformationParameters.php b/src/WssWsSecurity/Secext/TransformationParameters.php deleted file mode 100644 index f105714..0000000 --- a/src/WssWsSecurity/Secext/TransformationParameters.php +++ /dev/null @@ -1,13 +0,0 @@ -anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Secext/UsernameToken.php b/src/WssWsSecurity/Secext/UsernameToken.php deleted file mode 100644 index 977543a..0000000 --- a/src/WssWsSecurity/Secext/UsernameToken.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyAttribute($array) - { - $this->anyAttribute[] = $array; - return $this; - } - - /** - * isset anyAttribute - * - * @param scalar $index - * @return boolean - */ - public function issetAnyAttribute($index) - { - return isset($this->anyAttribute[$index]); - } - - /** - * unset anyAttribute - * - * @param scalar $index - * @return void - */ - public function unsetAnyAttribute($index) - { - unset($this->anyAttribute[$index]); - } - - /** - * Gets as anyAttribute - * - * @return mixed[] - */ - public function getAnyAttribute() - { - return $this->anyAttribute; - } - - /** - * Sets a new anyAttribute - * - * @param mixed[] $anyAttribute - * @return self - */ - public function setAnyAttribute(array $anyAttribute) - { - $this->anyAttribute = $anyAttribute; - return $this; - } - - /** - * Gets as username - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType - */ - public function getUsername() - { - return $this->username; - } - - /** - * Sets a new username - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType - * $username - * @return self - */ - public function setUsername(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext\AttributedStringType $username) - { - $this->username = $username; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Security.php b/src/WssWsSecurity/Security.php index 90705fd..fb6017e 100644 --- a/src/WssWsSecurity/Security.php +++ b/src/WssWsSecurity/Security.php @@ -35,27 +35,6 @@ class Security */ protected $username; - /** - * (SMS 10) Add security timestamp. - * - * @var boolean - */ - protected $addTimestamp = true; - - /** - * (UT 3.1) Username. - * - * @var \DateTime - */ - protected $timestamp; - - /** - * (SMS 10) Security timestamp expires time in seconds. - * - * @var int - */ - protected $expires = 300; - /** * @return string */ @@ -64,22 +43,6 @@ public function getPassword() return $this->password; } - /** - * @return \DateTime - */ - public function getTimestamp() - { - return $this->timestamp; - } - - /** - * @param \DateTime $timestamp - */ - public function setTimestamp(\DateTime $timestamp) - { - $this->timestamp = $timestamp; - } - /** * @param string $password * @param int $passwordType @@ -90,12 +53,14 @@ public function setPassword($password, $passwordType = self::PASSWORD_TYPE_DIGES $this->passwordType = $passwordType; } - /** - * @return int - */ - public function getPasswordType() + public function isPasswordDigest() { - return $this->passwordType; + return $this->passwordType === self::PASSWORD_TYPE_DIGEST; + } + + public function isPasswordPlain() + { + return $this->passwordType === self::PASSWORD_TYPE_TEXT; } /** @@ -113,38 +78,4 @@ public function setUsername($username) { $this->username = $username; } - - /** - * @return bool - */ - public function isAddTimestamp() - { - return $this->addTimestamp; - } - - /** - * @param bool $addTimestamp - */ - public function setAddTimestamp($addTimestamp) - { - $this->addTimestamp = $addTimestamp; - } - - /** - * @return int - */ - public function getExpires() - { - return $this->expires; - } - - /** - * @param int $expires - */ - public function setExpires($expires) - { - $this->expires = $expires; - } - - } diff --git a/src/WssWsSecurity/SecurityKeyPair.php b/src/WssWsSecurity/SecurityKeyPair.php new file mode 100644 index 0000000..31e43ea --- /dev/null +++ b/src/WssWsSecurity/SecurityKeyPair.php @@ -0,0 +1,101 @@ +privateKey = XmlSecurityKey::factory($encryptionType, $key, $keyIsFile, XmlSecurityKey::TYPE_PRIVATE, $passphrase); + } + + /** + * Add public key. + * + * @param string $encryptionType Encryption type + * @param string $key Public key + * @param boolean $keyIsFile Given key parameter is path to key file + * + * @return void + */ + public function setPublicKey($encryptionType, $key = null, $keyIsFile = true) + { + $this->publicKey = XmlSecurityKey::factory($encryptionType, $key, $keyIsFile, XmlSecurityKey::TYPE_PUBLIC); + } + + /** + * Get private key. + * + * @return \ass\XmlSecurity\Key + */ + public function getPrivateKey() + { + return $this->privateKey; + } + + /** + * Get public key. + * + * @return \ass\XmlSecurity\Key + */ + public function getPublicKey() + { + return $this->publicKey; + } + + /** + * Has private and public key? + * + * @return boolean + */ + public function hasKeys() + { + return null !== $this->privateKey && null !== $this->publicKey; + } + + /** + * Has private key? + * + * @return boolean + */ + public function hasPrivateKey() + { + return null !== $this->privateKey; + } + + /** + * Has public key? + * + * @return boolean + */ + public function hasPublicKey() + { + return null !== $this->publicKey; + } +} diff --git a/src/WssWsSecurity/Utility/AttributedDateTimeType.php b/src/WssWsSecurity/Utility/AttributedDateTimeType.php deleted file mode 100644 index d730633..0000000 --- a/src/WssWsSecurity/Utility/AttributedDateTimeType.php +++ /dev/null @@ -1,83 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param string $value - * @return string - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - /** - * Gets as id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Utility/AttributedURIType.php b/src/WssWsSecurity/Utility/AttributedURIType.php deleted file mode 100644 index 4fce48d..0000000 --- a/src/WssWsSecurity/Utility/AttributedURIType.php +++ /dev/null @@ -1,83 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param string $value - * @return string - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - /** - * Gets as id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/Utility/Created.php b/src/WssWsSecurity/Utility/Created.php deleted file mode 100644 index 0e15189..0000000 --- a/src/WssWsSecurity/Utility/Created.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Gets as created - * - * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created - */ - public function getCreated() - { - return $this->created; - } - - /** - * Sets a new created - * - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created - * $created - * @return self - */ - public function setCreated(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Created $created) - { - $this->created = $created; - return $this; - } - - /** - * Gets as expires - * - * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires - */ - public function getExpires() - { - return $this->expires; - } - - /** - * Sets a new expires - * - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires - * $expires - * @return self - */ - public function setExpires(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Expires $expires) - { - $this->expires = $expires; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/WsSecurityFilterRequest.php b/src/WssWsSecurity/WsSecurityFilterRequest.php new file mode 100644 index 0000000..8312dcd --- /dev/null +++ b/src/WssWsSecurity/WsSecurityFilterRequest.php @@ -0,0 +1,447 @@ +addTimestamp = $addTimestamp; + $this->expires = $expires; + } + + /** + * @param \DateTime $initialTimestamp + */ + public function __construct(\DateTime $initialTimestamp = null) + { + $this->initialTimestamp = $initialTimestamp; + } + + /** + * Set security options. + * + * @param int $tokenReference self::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER | self::TOKEN_REFERENCE_SECURITY_TOKEN | self::TOKEN_REFERENCE_THUMBPRINT_SHA1 + * @param boolean $encryptSignature Encrypt signature + * + * @return void + */ + public function setSecurityOptionsEncryption($tokenReference, $encryptSignature = false) + { + $this->tokenReferenceEncryption = $tokenReference; + $this->encryptSignature = $encryptSignature; + } + + /** + * Set security options. + * + * @param int $tokenReference self::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER | self::TOKEN_REFERENCE_SECURITY_TOKEN | self::TOKEN_REFERENCE_THUMBPRINT_SHA1 + * @param boolean $signAllHeaders Sign all headers? + * + * @return void + */ + public function setSecurityOptionsSignature($tokenReference, $signAllHeaders = false) + { + $this->tokenReferenceSignature = $tokenReference; + $this->signAllHeaders = $signAllHeaders; + } + + /** + * Adds the configured KeyInfo to the parentNode. + * + * @param \DOMDocument $dom + * @param int $tokenReference Token reference type + * @param string $guid Unique ID + * @param XmlSecurityKey $xmlSecurityKey XML security key + * + * @return \DOMElement + */ + private function createKeyInfo(\DOMDocument $dom, $tokenReference, $guid, XmlSecurityKey $xmlSecurityKey = null) + { + $keyInfo = $dom->createElementNS(XmlSecurityDSig::NS_XMLDSIG, 'KeyInfo'); + $securityTokenReference = $dom->createElementNS(self::NS_WSS, 'SecurityTokenReference'); + $keyInfo->appendChild($securityTokenReference); + // security token + if (self::TOKEN_REFERENCE_SECURITY_TOKEN === $tokenReference) { + $reference = $dom->createElementNS(self::NS_WSS, 'Reference'); + $reference->setAttribute('URI', '#' . $guid); + if (null !== $xmlSecurityKey) { + $reference->setAttribute('ValueType', self::NAME_WSS_X509 . '#X509v3'); + } + $securityTokenReference->appendChild($reference); + // subject key identifier + } elseif (self::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER === $tokenReference && null !== $xmlSecurityKey) { + $keyIdentifier = $dom->createElementNS(self::NS_WSS, 'KeyIdentifier'); + $keyIdentifier->setAttribute('EncodingType', self::NAME_WSS_SMS . '#Base64Binary'); + $keyIdentifier->setAttribute('ValueType', self::NAME_WSS_X509 . '#509SubjectKeyIdentifier'); + $securityTokenReference->appendChild($keyIdentifier); + $certificate = $xmlSecurityKey->getX509SubjectKeyIdentifier(); + $dataNode = new \DOMText($certificate); + $keyIdentifier->appendChild($dataNode); + // thumbprint sha1 + } elseif (self::TOKEN_REFERENCE_THUMBPRINT_SHA1 === $tokenReference && null !== $xmlSecurityKey) { + $keyIdentifier = $dom->createElementNS(self::NS_WSS, 'KeyIdentifier'); + $keyIdentifier->setAttribute('EncodingType', self::NAME_WSS_SMS . '#Base64Binary'); + $keyIdentifier->setAttribute('ValueType', self::NAME_WSS_SMS_1_1 . '#ThumbprintSHA1'); + $securityTokenReference->appendChild($keyIdentifier); + $thumbprintSha1 = base64_encode(sha1(base64_decode($xmlSecurityKey->getX509Certificate(true)), true)); + $dataNode = new \DOMText($thumbprintSha1); + $keyIdentifier->appendChild($dataNode); + } + + return $keyInfo; + } + + /** + * Create a list of \DOMNodes that should be encrypted. + * + * @param \DOMDocument $dom DOMDocument to query + * + * @return \DOMNodeList + */ + private function createNodeListForEncryption(\DOMDocument $dom) + { + $xpath = new \DOMXPath($dom); + $xpath->registerNamespace('SOAP-ENV', $dom->documentElement->namespaceURI); + $xpath->registerNamespace('ds', XmlSecurityDSig::NS_XMLDSIG); + if ($this->encryptSignature === true) { + $query = '//ds:Signature | //SOAP-ENV:Body'; + } else { + $query = '//SOAP-ENV:Body'; + } + + return $xpath->query($query); + } + + /** + * Create a list of \DOMNodes that should be signed. + * + * @param \DOMDocument $dom DOMDocument to query + * @param \DOMElement $security Security element + * + * @return array(\DOMNode) + */ + private function createNodeListForSigning(\DOMDocument $dom, \DOMElement $security) + { + $nodes = array(); + $body = $dom->getElementsByTagNameNS($dom->documentElement->namespaceURI, 'Body')->item(0); + if (null !== $body) { + $nodes[] = $body; + } + foreach ($security->childNodes as $node) { + if (XML_ELEMENT_NODE === $node->nodeType) { + $nodes[] = $node; + } + } + if ($this->signAllHeaders) { + foreach ($security->parentNode->childNodes as $node) { + if (XML_ELEMENT_NODE === $node->nodeType && + self::NS_WSS !== $node->namespaceURI + ) { + $nodes[] = $node; + } + } + } + return $nodes; + } + + + /** + * Modify the given request XML. + * + * @param \DOMDocument $dom + * @param Security $securityData + * + * @return \DOMElement + */ + public function filterDom(\DOMDocument $dom, Security $securityData) + { + $security = $dom->createElementNS(self::NS_WSS, 'Security'); + + $root = $dom->documentElement; + $root->setAttributeNS( + 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI + 'xmlns:wssu', + self::NS_WSU + ); + $root->setAttributeNS( + 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI + 'xmlns:wsss', + self::NS_WSS + ); + $root->setAttributeNS( + 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI + 'xmlns:dsig', + XmlSecurityDSig::NS_XMLDSIG + ); + $root->setAttributeNS( + 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI + 'xmlns:xenc', + XmlSecurityEnc::NS_XMLENC + ); + + // init timestamp + $dt = $this->initialTimestamp ?: new \DateTime('now', new \DateTimeZone('UTC')); + + if (true === $this->addTimestamp || null !== $this->expires) { + $this->handleTimestamp($security, $dt); + } + + if (null !== $securityData->getUsername()) { + $this->handleUsername($security, $dt, $securityData); + } + + if (null !== $this->userSecurityKey && $this->userSecurityKey->hasKeys()) { + $signature = $this->handleSignature($security); + + // encrypt soap document + if (null !== $this->serviceSecurityKey && $this->serviceSecurityKey->hasKeys()) { + $this->handleEncryption($security, $signature); + } + } + return $security; + } + + /** + * Generate a pseudo-random version 4 UUID. + * + * @see http://de.php.net/manual/en/function.uniqid.php#94959 + * + * @return string + */ + private static function generateUUID() + { + return sprintf( + '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', + // 32 bits for "time_low" + mt_rand(0, 0xffff), mt_rand(0, 0xffff), + // 16 bits for "time_mid" + mt_rand(0, 0xffff), + // 16 bits for "time_hi_and_version", + // four most significant bits holds version number 4 + mt_rand(0, 0x0fff) | 0x4000, + // 16 bits, 8 bits for "clk_seq_hi_res", + // 8 bits for "clk_seq_low", + // two most significant bits holds zero and one for variant DCE1.1 + mt_rand(0, 0x3fff) | 0x8000, + // 48 bits for "node" + mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) + ); + } + + /** + * @param \DOMElement $security + * @param \DateTime $dt + */ + private function handleTimestamp(\DOMElement $security, \DateTime $dt) + { + $dom = $security->ownerDocument; + $timestamp = $dom->createElementNS(self::NS_WSU, 'Timestamp'); + $created = $dom->createElementNS(self::NS_WSU, 'Created', $dt->format(self::DATETIME_FORMAT)); + $timestamp->appendChild($created); + if (null !== $this->expires) { + $dt = clone $dt; + $dt->modify('+' . $this->expires . ' seconds'); + $expiresTimestamp = $dt->format(self::DATETIME_FORMAT); + $expires = $dom->createElementNS(self::NS_WSU, 'Expires', $expiresTimestamp); + $timestamp->appendChild($expires); + } + $security->appendChild($timestamp); + } + + /** + * @param \DOMElement $security + * @param $dt + * @param Security $securityData + */ + private function handleUsername(\DOMElement $security, $dt, Security $securityData) + { + $dom = $security->ownerDocument; + $usernameToken = $dom->createElementNS(self::NS_WSS, 'UsernameToken'); + $security->appendChild($usernameToken); + + $username = $dom->createElementNS(self::NS_WSS, 'Username', $securityData->getUsername()); + $usernameToken->appendChild($username); + + if (null !== $securityData->getPassword() + && (null === $this->userSecurityKey + || (null !== $this->userSecurityKey && !$this->userSecurityKey->hasPrivateKey())) + ) { + + if ($securityData->isPasswordDigest()) { + $nonce = mt_rand(); + $password = base64_encode(sha1($nonce . $dt->format(self::DATETIME_FORMAT) . $securityData->getPassword(), true)); + $passwordType = self::NAME_WSS_UTP . '#PasswordDigest'; + } else { + $password = $securityData->getPassword(); + $passwordType = self::NAME_WSS_UTP . '#PasswordText'; + } + + $password = $dom->createElementNS(self::NS_WSS, 'Password', $password); + $password->setAttribute('Type', $passwordType); + $usernameToken->appendChild($password); + if ($securityData->isPasswordDigest()) { + $nonce = $dom->createElementNS(self::NS_WSS, 'Nonce', base64_encode($nonce)); + $usernameToken->appendChild($nonce); + + $created = $dom->createElementNS(self::NS_WSU, 'Created', $dt->format(self::DATETIME_FORMAT)); + $usernameToken->appendChild($created); + } + } + } + + /** + * @param \DOMElement $security + * @return \DOMElement + */ + private function handleSignature(\DOMElement $security) + { + $dom = $security->ownerDocument; + $guid = 'CertId-' . self::generateUUID(); + // add token references + $keyInfo = null; + if (null !== $this->tokenReferenceSignature) { + $keyInfo = $this->createKeyInfo($dom, $this->tokenReferenceSignature, $guid, $this->userSecurityKey->getPublicKey()); + } + $nodes = $this->createNodeListForSigning($dom, $security); + $signature = XmlSecurityDSig::createSignature($this->userSecurityKey->getPrivateKey(), XmlSecurityDSig::EXC_C14N, $security, null, $keyInfo); + + if ((!$prefix = $security->lookupPrefix(self::NS_WSU)) && (!$prefix = $security->ownerDocument->lookupPrefix(self::NS_WSU))) { + $prefix = 'ns-'. substr(sha1(self::NS_WSU), 0, 8); + } + + $options = array( + 'id_ns_prefix' => $prefix ?: 'wsu', + 'id_prefix_ns' => self::NS_WSU, + ); + foreach ($nodes as $node) { + XmlSecurityDSig::addNodeToSignature($signature, $node, XmlSecurityDSig::SHA1, XmlSecurityDSig::EXC_C14N, $options); + } + XmlSecurityDSig::signDocument($signature, $this->userSecurityKey->getPrivateKey(), XmlSecurityDSig::EXC_C14N); + + $publicCertificate = $this->userSecurityKey->getPublicKey()->getX509Certificate(true); + $binarySecurityToken = $dom->createElementNS(self::NS_WSS, 'BinarySecurityToken', $publicCertificate); + $binarySecurityToken->setAttribute('EncodingType', self::NAME_WSS_SMS . '#Base64Binary'); + $binarySecurityToken->setAttribute('ValueType', self::NAME_WSS_X509 . '#X509v3'); + + $security->insertBefore($binarySecurityToken, $signature); + + $binarySecurityToken->setAttributeNs(self::NS_WSU, $prefix.':Id', $guid); + + + return $signature; + } + + /** + * @param \DOMElement $security + * @param \DOMElement $signature + */ + private function handleEncryption(\DOMElement $security, \DOMElement $signature) + { + $dom = $security->ownerDocument; + $guid = 'EncKey-' . self::generateUUID(); + // add token references + $keyInfo = null; + if (null !== $this->tokenReferenceEncryption) { + $keyInfo = $this->createKeyInfo($dom, $this->tokenReferenceEncryption, $guid, $this->serviceSecurityKey->getPublicKey()); + } + $encryptedKey = XmlSecurityEnc::createEncryptedKey($guid, $this->serviceSecurityKey->getPrivateKey(), $this->serviceSecurityKey->getPublicKey(), $security, $signature, $keyInfo); + $referenceList = XmlSecurityEnc::createReferenceList($encryptedKey); + // token reference to encrypted key + $keyInfo = $this->createKeyInfo($dom, self::TOKEN_REFERENCE_SECURITY_TOKEN, $guid); + $nodes = $this->createNodeListForEncryption($dom); + foreach ($nodes as $node) { + $type = XmlSecurityEnc::ELEMENT; + if ($node->localName == 'Body') { + $type = XmlSecurityEnc::CONTENT; + } + XmlSecurityEnc::encryptNode($node, $type, $this->serviceSecurityKey->getPrivateKey(), $referenceList, $keyInfo); + } + } +} diff --git a/src/WssWsSecurity/WsSecurityFilterResponse.php b/src/WssWsSecurity/WsSecurityFilterResponse.php new file mode 100644 index 0000000..82f7d9e --- /dev/null +++ b/src/WssWsSecurity/WsSecurityFilterResponse.php @@ -0,0 +1,117 @@ +ownerDocument); + $xpath->registerNamespace('wsu', self::NS_WSU); + + return $xpath->query($query)->item(0); + } + + /** + * Tries to resolve a key from the given \DOMElement. + * + * @param \DOMElement $node Node where to resolve the key + * @param string $algorithm XML security key algorithm + * + * @return \ass\XmlSecurity\Key|null + */ + protected function keyInfoSecurityTokenReferenceResolver(\DOMElement $node, $algorithm) + { + foreach ($node->childNodes as $key) { + if (self::NS_WSS === $key->namespaceURI) { + switch ($key->localName) { + case 'KeyIdentifier': + + return $this->serviceSecurityKey->getPublicKey(); + case 'Reference': + $uri = $key->getAttribute('URI'); + $referencedNode = $this->getReferenceNodeForUri($node, $uri); + + if (XmlSecurityEnc::NS_XMLENC === $referencedNode->namespaceURI + && 'EncryptedKey' == $referencedNode->localName + ) { + $key = XmlSecurityEnc::decryptEncryptedKey($referencedNode, $this->userSecurityKey->getPrivateKey()); + + return XmlSecurityKey::factory($algorithm, $key, false, XmlSecurityKey::TYPE_PRIVATE); + } elseif (self::NS_WSS === $referencedNode->namespaceURI + && 'BinarySecurityToken' == $referencedNode->localName + ) { + + $key = XmlSecurityPem::formatKeyInPemFormat($referencedNode->textContent); + + return XmlSecurityKey::factory(XmlSecurityKey::RSA_SHA1, $key, false, XmlSecurityKey::TYPE_PUBLIC); + } + } + } + } + + return null; + } + + /** + * Modify the given request XML. + * + * @param \DOMDocument $dom + * + * @return void + */ + public function filterDom(\DOMDocument $dom) + { + + // locate security header + $security = $dom->getElementsByTagNameNS(self::NS_WSS, 'Security')->item(0); + if (null !== $security) { + // add SecurityTokenReference resolver for KeyInfo + $keyResolver = array($this, 'keyInfoSecurityTokenReferenceResolver'); + XmlSecurityDSig::addKeyInfoResolver(self::NS_WSS, 'SecurityTokenReference', $keyResolver); + // do we have a reference list in header + $referenceList = XmlSecurityEnc::locateReferenceList($security); + // get a list of encrypted nodes + $encryptedNodes = XmlSecurityEnc::locateEncryptedData($dom, $referenceList); + // decrypt them + if (null !== $encryptedNodes) { + foreach ($encryptedNodes as $encryptedNode) { + XmlSecurityEnc::decryptNode($encryptedNode); + } + } + // locate signature node + $signature = XmlSecurityDSig::locateSignature($security); + if (null !== $signature) { + // verify references + $options = array( + 'id_ns_prefix' => 'wsu', // used only for the xpath prefix + 'id_prefix_ns' => self::PFX_WSU + ); + if (XmlSecurityDSig::verifyReferences($signature, $options) !== true) { + throw new \SoapFault('wsse:FailedCheck', 'The signature or decryption was invalid'); + } + // verify signature + if (XmlSecurityDSig::verifyDocumentSignature($signature) !== true) { + throw new \SoapFault('wsse:FailedCheck', 'The signature or decryption was invalid'); + } + } + + $security->parentNode->removeChild($security); + } + } +} diff --git a/src/WssWsSecurity/WssSecurityHeaderEventHandler.php b/src/WssWsSecurity/WssSecurityHeaderEventHandler.php deleted file mode 100644 index 8f704f7..0000000 --- a/src/WssWsSecurity/WssSecurityHeaderEventHandler.php +++ /dev/null @@ -1,70 +0,0 @@ - 'serializer.post_serialize', - 'method' => 'serializeAnyElement', - 'class' => SecextSecurity::class, - 'format' => 'xml' - ), - array( - 'event' => 'serializer.post_serialize', - 'method' => 'serializeAnyElement', - 'class' => UsernameToken::class, - 'format' => 'xml' - ), - array( - 'event' => 'serializer.post_serialize', - 'method' => 'serializeAnyElement', - 'class' => Timestamp::class, - 'format' => 'xml' - ), - ); - } - - public function serializeAnyElement(ObjectEvent $event) - { - /** - * @var $security SecextSecurity - */ - $security = $event->getObject(); - $items = $security->getAnyElement(); - if (!count($items)) { - return; - } - $context = $event->getContext(); - $visitor = $event->getVisitor(); - $metadataFactory = $context->getMetadataFactory();; - - foreach ($items as $item) { - /** - * @var $itemMetadata ClassMetadata - */ - $itemMetadata = $metadataFactory->getMetadataForClass(get_class($item)); - - $prop = new StaticPropertyMetadata(get_class($item), $itemMetadata->xmlRootName, $item); - $prop->serializedName = $itemMetadata->xmlRootName; - $prop->xmlNamespace = $itemMetadata->xmlRootNamespace; - - $visitor->visitProperty($prop, $item, $context); - } - } -} diff --git a/src/WssWsSecurity/WssSecurityHeaderHandler.php b/src/WssWsSecurity/WssSecurityHeaderHandler.php index 6c0a202..e73cf29 100644 --- a/src/WssWsSecurity/WssSecurityHeaderHandler.php +++ b/src/WssWsSecurity/WssSecurityHeaderHandler.php @@ -11,15 +11,16 @@ use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility\Timestamp; use JMS\Serializer\GraphNavigator; use JMS\Serializer\Handler\SubscribingHandlerInterface; +use JMS\Serializer\Metadata\StaticPropertyMetadata; use JMS\Serializer\SerializationContext; use JMS\Serializer\XmlSerializationVisitor; class WssSecurityHeaderHandler implements SubscribingHandlerInterface { - const WSS_UTP = 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0'; - const DATETIME_FORMAT = 'Y-m-d\TH:i:s.000\Z'; - - protected $nonce; + /** + * @var WsSecurityFilterRequest + */ + protected $filter; public static function getSubscribingMethods() { @@ -33,75 +34,19 @@ public static function getSubscribingMethods() ); } - public function setNonce($nonce) + public function __construct(WsSecurityFilterRequest $filterResponse) { - $this->nonce = $nonce; + $this->filter = $filterResponse; } public function serializeHeader(XmlSerializationVisitor $visitor, Security $data, array $type, SerializationContext $context) { - $dt = $data->getTimestamp() ?: new \DateTime('now', new \DateTimeZone('UTC')); - $security = new SecextSecurity(); - - if ($data->isAddTimestamp() || $data->getExpires() > 0) { - $security->addToAnyElement($this->handleTimestamp($data, $dt)); - } - if (null !== $data->getUsername()) { - $security->addToAnyElement($this->handleUsername($data, $dt)); - } - $context->getNavigator()->accept($security, null, $context); - } - - /** - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security $data - * @param \DateTime $dt - * @return UsernameToken - */ - private function handleUsername(Security $data, \DateTime $dt) - { - $usernameToken = new UsernameToken(); - $usernameToken->setUsername(new AttributedStringType($data->getUsername())); - - if (null !== $data->getPassword()) { - - if (Security::PASSWORD_TYPE_DIGEST === $data->getPasswordType()) { - $nonce = $this->nonce ?: mt_rand(); - $password = base64_encode(sha1($nonce . $dt->format(self::DATETIME_FORMAT) . $data->getPassword(), true)); - $passwordType = self::WSS_UTP . '#PasswordDigest'; - - $usernameToken->addToAnyElement(new Nonce(base64_encode($nonce))); - $usernameToken->addToAnyElement(new Created($dt->format(self::DATETIME_FORMAT))); - - } else { - $password = $data->getPassword(); - $passwordType = self::WSS_UTP . '#PasswordText'; - } - - $passwordItem = new Password($password); - $passwordItem->setType($passwordType); - - $usernameToken->addToAnyElement($passwordItem); - } - return $usernameToken; - } - - /** - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security $data - * @param \DateTime $dt - * @return Timestamp - */ - private function handleTimestamp(Security $data, \DateTime $dt) - { - $timestamp = new Timestamp(); - - $timestamp->setCreated(new Created($dt->format(self::DATETIME_FORMAT))); - if ($data->getExpires() > 0) { - $expireDate = clone $dt; - $expireDate->modify('+' . $data->getExpires() . ' seconds'); + $securityHeader = $this->filter->filterDom($visitor->getDocument(), $data); - $timestamp->setExpires(new Expires($expireDate->format(self::DATETIME_FORMAT))); - } - return $timestamp; + $currentNode = $visitor->getCurrentNode(); + $currentNode->parentNode->replaceChild($securityHeader, $currentNode); + $visitor->revertCurrentNode(); + $visitor->setCurrentNode($securityHeader); } } diff --git a/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php b/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php deleted file mode 100644 index b6997c3..0000000 --- a/src/WssWsSecurity/XmlSign/CanonicalizationMethod.php +++ /dev/null @@ -1,13 +0,0 @@ -algorithm; - } - - /** - * Sets a new algorithm - * - * @param string $algorithm - * @return self - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/DSAKeyValue.php b/src/WssWsSecurity/XmlSign/DSAKeyValue.php deleted file mode 100644 index 9601265..0000000 --- a/src/WssWsSecurity/XmlSign/DSAKeyValue.php +++ /dev/null @@ -1,13 +0,0 @@ -p; - } - - /** - * Sets a new p - * - * @param mixed $p - * @return self - */ - public function setP($p) - { - $this->p = $p; - return $this; - } - - /** - * Gets as q - * - * @return mixed - */ - public function getQ() - { - return $this->q; - } - - /** - * Sets a new q - * - * @param mixed $q - * @return self - */ - public function setQ($q) - { - $this->q = $q; - return $this; - } - - /** - * Gets as g - * - * @return mixed - */ - public function getG() - { - return $this->g; - } - - /** - * Sets a new g - * - * @param mixed $g - * @return self - */ - public function setG($g) - { - $this->g = $g; - return $this; - } - - /** - * Gets as y - * - * @return mixed - */ - public function getY() - { - return $this->y; - } - - /** - * Sets a new y - * - * @param mixed $y - * @return self - */ - public function setY($y) - { - $this->y = $y; - return $this; - } - - /** - * Gets as j - * - * @return mixed - */ - public function getJ() - { - return $this->j; - } - - /** - * Sets a new j - * - * @param mixed $j - * @return self - */ - public function setJ($j) - { - $this->j = $j; - return $this; - } - - /** - * Gets as seed - * - * @return mixed - */ - public function getSeed() - { - return $this->seed; - } - - /** - * Sets a new seed - * - * @param mixed $seed - * @return self - */ - public function setSeed($seed) - { - $this->seed = $seed; - return $this; - } - - /** - * Gets as pgenCounter - * - * @return mixed - */ - public function getPgenCounter() - { - return $this->pgenCounter; - } - - /** - * Sets a new pgenCounter - * - * @param mixed $pgenCounter - * @return self - */ - public function setPgenCounter($pgenCounter) - { - $this->pgenCounter = $pgenCounter; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/DigestMethod.php b/src/WssWsSecurity/XmlSign/DigestMethod.php deleted file mode 100644 index ede0eee..0000000 --- a/src/WssWsSecurity/XmlSign/DigestMethod.php +++ /dev/null @@ -1,13 +0,0 @@ -algorithm; - } - - /** - * Sets a new algorithm - * - * @param string $algorithm - * @return self - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/DigestValue.php b/src/WssWsSecurity/XmlSign/DigestValue.php deleted file mode 100644 index f4a7e30..0000000 --- a/src/WssWsSecurity/XmlSign/DigestValue.php +++ /dev/null @@ -1,52 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param mixed $value - * @return mixed - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/KeyInfo.php b/src/WssWsSecurity/XmlSign/KeyInfo.php deleted file mode 100644 index 18472c9..0000000 --- a/src/WssWsSecurity/XmlSign/KeyInfo.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as keyName - * - * @return self - * @param string $keyName - */ - public function addToKeyName($keyName) - { - $this->keyName[] = $keyName; - return $this; - } - - /** - * isset keyName - * - * @param scalar $index - * @return boolean - */ - public function issetKeyName($index) - { - return isset($this->keyName[$index]); - } - - /** - * unset keyName - * - * @param scalar $index - * @return void - */ - public function unsetKeyName($index) - { - unset($this->keyName[$index]); - } - - /** - * Gets as keyName - * - * @return string[] - */ - public function getKeyName() - { - return $this->keyName; - } - - /** - * Sets a new keyName - * - * @param string $keyName - * @return self - */ - public function setKeyName(array $keyName) - { - $this->keyName = $keyName; - return $this; - } - - /** - * Adds as keyValue - * - * @return self - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue - * $keyValue - */ - public function addToKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue $keyValue) - { - $this->keyValue[] = $keyValue; - return $this; - } - - /** - * isset keyValue - * - * @param scalar $index - * @return boolean - */ - public function issetKeyValue($index) - { - return isset($this->keyValue[$index]); - } - - /** - * unset keyValue - * - * @param scalar $index - * @return void - */ - public function unsetKeyValue($index) - { - unset($this->keyValue[$index]); - } - - /** - * Gets as keyValue - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue[] - */ - public function getKeyValue() - { - return $this->keyValue; - } - - /** - * Sets a new keyValue - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyValue[] - * $keyValue - * @return self - */ - public function setKeyValue(array $keyValue) - { - $this->keyValue = $keyValue; - return $this; - } - - /** - * Adds as retrievalMethod - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod - * $retrievalMethod - */ - public function addToRetrievalMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod $retrievalMethod) - { - $this->retrievalMethod[] = $retrievalMethod; - return $this; - } - - /** - * isset retrievalMethod - * - * @param scalar $index - * @return boolean - */ - public function issetRetrievalMethod($index) - { - return isset($this->retrievalMethod[$index]); - } - - /** - * unset retrievalMethod - * - * @param scalar $index - * @return void - */ - public function unsetRetrievalMethod($index) - { - unset($this->retrievalMethod[$index]); - } - - /** - * Gets as retrievalMethod - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod[] - */ - public function getRetrievalMethod() - { - return $this->retrievalMethod; - } - - /** - * Sets a new retrievalMethod - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RetrievalMethod[] - * $retrievalMethod - * @return self - */ - public function setRetrievalMethod(array $retrievalMethod) - { - $this->retrievalMethod = $retrievalMethod; - return $this; - } - - /** - * Adds as x509Data - * - * @return self - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data - * $x509Data - */ - public function addToX509Data(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data $x509Data) - { - $this->x509Data[] = $x509Data; - return $this; - } - - /** - * isset x509Data - * - * @param scalar $index - * @return boolean - */ - public function issetX509Data($index) - { - return isset($this->x509Data[$index]); - } - - /** - * unset x509Data - * - * @param scalar $index - * @return void - */ - public function unsetX509Data($index) - { - unset($this->x509Data[$index]); - } - - /** - * Gets as x509Data - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data[] - */ - public function getX509Data() - { - return $this->x509Data; - } - - /** - * Sets a new x509Data - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509Data[] - * $x509Data - * @return self - */ - public function setX509Data(array $x509Data) - { - $this->x509Data = $x509Data; - return $this; - } - - /** - * Adds as pGPData - * - * @return self - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData - * $pGPData - */ - public function addToPGPData(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData $pGPData) - { - $this->pGPData[] = $pGPData; - return $this; - } - - /** - * isset pGPData - * - * @param scalar $index - * @return boolean - */ - public function issetPGPData($index) - { - return isset($this->pGPData[$index]); - } - - /** - * unset pGPData - * - * @param scalar $index - * @return void - */ - public function unsetPGPData($index) - { - unset($this->pGPData[$index]); - } - - /** - * Gets as pGPData - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData[] - */ - public function getPGPData() - { - return $this->pGPData; - } - - /** - * Sets a new pGPData - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\PGPData[] - * $pGPData - * @return self - */ - public function setPGPData(array $pGPData) - { - $this->pGPData = $pGPData; - return $this; - } - - /** - * Adds as sPKISexp - * - * @return self - * @param mixed $sPKISexp - */ - public function addToSPKIData($sPKISexp) - { - $this->sPKIData[] = $sPKISexp; - return $this; - } - - /** - * isset sPKIData - * - * @param scalar $index - * @return boolean - */ - public function issetSPKIData($index) - { - return isset($this->sPKIData[$index]); - } - - /** - * unset sPKIData - * - * @param scalar $index - * @return void - */ - public function unsetSPKIData($index) - { - unset($this->sPKIData[$index]); - } - - /** - * Gets as sPKIData - * - * @return mixed[] - */ - public function getSPKIData() - { - return $this->sPKIData; - } - - /** - * Sets a new sPKIData - * - * @param mixed $sPKIData - * @return self - */ - public function setSPKIData(array $sPKIData) - { - $this->sPKIData = $sPKIData; - return $this; - } - - /** - * Adds as mgmtData - * - * @return self - * @param string $mgmtData - */ - public function addToMgmtData($mgmtData) - { - $this->mgmtData[] = $mgmtData; - return $this; - } - - /** - * isset mgmtData - * - * @param scalar $index - * @return boolean - */ - public function issetMgmtData($index) - { - return isset($this->mgmtData[$index]); - } - - /** - * unset mgmtData - * - * @param scalar $index - * @return void - */ - public function unsetMgmtData($index) - { - unset($this->mgmtData[$index]); - } - - /** - * Gets as mgmtData - * - * @return string[] - */ - public function getMgmtData() - { - return $this->mgmtData; - } - - /** - * Sets a new mgmtData - * - * @param string $mgmtData - * @return self - */ - public function setMgmtData(array $mgmtData) - { - $this->mgmtData = $mgmtData; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/KeyName.php b/src/WssWsSecurity/XmlSign/KeyName.php deleted file mode 100644 index 984a0d6..0000000 --- a/src/WssWsSecurity/XmlSign/KeyName.php +++ /dev/null @@ -1,52 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param string $value - * @return string - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/KeyValue.php b/src/WssWsSecurity/XmlSign/KeyValue.php deleted file mode 100644 index 18731b5..0000000 --- a/src/WssWsSecurity/XmlSign/KeyValue.php +++ /dev/null @@ -1,13 +0,0 @@ -dSAKeyValue; - } - - /** - * Sets a new dSAKeyValue - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue - * $dSAKeyValue - * @return self - */ - public function setDSAKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DSAKeyValue $dSAKeyValue) - { - $this->dSAKeyValue = $dSAKeyValue; - return $this; - } - - /** - * Gets as rSAKeyValue - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue - */ - public function getRSAKeyValue() - { - return $this->rSAKeyValue; - } - - /** - * Sets a new rSAKeyValue - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue - * $rSAKeyValue - * @return self - */ - public function setRSAKeyValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\RSAKeyValue $rSAKeyValue) - { - $this->rSAKeyValue = $rSAKeyValue; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/Manifest.php b/src/WssWsSecurity/XmlSign/Manifest.php deleted file mode 100644 index d83fc9f..0000000 --- a/src/WssWsSecurity/XmlSign/Manifest.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as reference - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference - * $reference - */ - public function addToReference(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference $reference) - { - $this->reference[] = $reference; - return $this; - } - - /** - * isset reference - * - * @param scalar $index - * @return boolean - */ - public function issetReference($index) - { - return isset($this->reference[$index]); - } - - /** - * unset reference - * - * @param scalar $index - * @return void - */ - public function unsetReference($index) - { - unset($this->reference[$index]); - } - - /** - * Gets as reference - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] - */ - public function getReference() - { - return $this->reference; - } - - /** - * Sets a new reference - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] - * $reference - * @return self - */ - public function setReference(array $reference) - { - $this->reference = $reference; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/MgmtData.php b/src/WssWsSecurity/XmlSign/MgmtData.php deleted file mode 100644 index 55b86e1..0000000 --- a/src/WssWsSecurity/XmlSign/MgmtData.php +++ /dev/null @@ -1,52 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param string $value - * @return string - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/ObjectType.php b/src/WssWsSecurity/XmlSign/ObjectType.php deleted file mode 100644 index f58e651..0000000 --- a/src/WssWsSecurity/XmlSign/ObjectType.php +++ /dev/null @@ -1,160 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Gets as mimeType - * - * @return string - */ - public function getMimeType() - { - return $this->mimeType; - } - - /** - * Sets a new mimeType - * - * @param string $mimeType - * @return self - */ - public function setMimeType($mimeType) - { - $this->mimeType = $mimeType; - return $this; - } - - /** - * Gets as encoding - * - * @return string - */ - public function getEncoding() - { - return $this->encoding; - } - - /** - * Sets a new encoding - * - * @param string $encoding - * @return self - */ - public function setEncoding($encoding) - { - $this->encoding = $encoding; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/ObjectXsd.php b/src/WssWsSecurity/XmlSign/ObjectXsd.php deleted file mode 100644 index 134798e..0000000 --- a/src/WssWsSecurity/XmlSign/ObjectXsd.php +++ /dev/null @@ -1,13 +0,0 @@ -pGPKeyID; - } - - /** - * Sets a new pGPKeyID - * - * @param mixed $pGPKeyID - * @return self - */ - public function setPGPKeyID($pGPKeyID) - { - $this->pGPKeyID = $pGPKeyID; - return $this; - } - - /** - * Gets as pGPKeyPacket - * - * @return mixed - */ - public function getPGPKeyPacket() - { - return $this->pGPKeyPacket; - } - - /** - * Sets a new pGPKeyPacket - * - * @param mixed $pGPKeyPacket - * @return self - */ - public function setPGPKeyPacket($pGPKeyPacket) - { - $this->pGPKeyPacket = $pGPKeyPacket; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/RSAKeyValue.php b/src/WssWsSecurity/XmlSign/RSAKeyValue.php deleted file mode 100644 index cb47d04..0000000 --- a/src/WssWsSecurity/XmlSign/RSAKeyValue.php +++ /dev/null @@ -1,13 +0,0 @@ -modulus; - } - - /** - * Sets a new modulus - * - * @param mixed $modulus - * @return self - */ - public function setModulus($modulus) - { - $this->modulus = $modulus; - return $this; - } - - /** - * Gets as exponent - * - * @return mixed - */ - public function getExponent() - { - return $this->exponent; - } - - /** - * Sets a new exponent - * - * @param mixed $exponent - * @return self - */ - public function setExponent($exponent) - { - $this->exponent = $exponent; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/Reference.php b/src/WssWsSecurity/XmlSign/Reference.php deleted file mode 100644 index 019806d..0000000 --- a/src/WssWsSecurity/XmlSign/Reference.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Gets as uRI - * - * @return string - */ - public function getURI() - { - return $this->uRI; - } - - /** - * Sets a new uRI - * - * @param string $uRI - * @return self - */ - public function setURI($uRI) - { - $this->uRI = $uRI; - return $this; - } - - /** - * Gets as type - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Sets a new type - * - * @param string $type - * @return self - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Adds as transform - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform - * $transform - */ - public function addToTransforms(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform $transform) - { - $this->transforms[] = $transform; - return $this; - } - - /** - * isset transforms - * - * @param scalar $index - * @return boolean - */ - public function issetTransforms($index) - { - return isset($this->transforms[$index]); - } - - /** - * unset transforms - * - * @param scalar $index - * @return void - */ - public function unsetTransforms($index) - { - unset($this->transforms[$index]); - } - - /** - * Gets as transforms - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - */ - public function getTransforms() - { - return $this->transforms; - } - - /** - * Sets a new transforms - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - * $transforms - * @return self - */ - public function setTransforms(array $transforms) - { - $this->transforms = $transforms; - return $this; - } - - /** - * Gets as digestMethod - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod - */ - public function getDigestMethod() - { - return $this->digestMethod; - } - - /** - * Sets a new digestMethod - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod - * $digestMethod - * @return self - */ - public function setDigestMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\DigestMethod $digestMethod) - { - $this->digestMethod = $digestMethod; - return $this; - } - - /** - * Gets as digestValue - * - * @return mixed - */ - public function getDigestValue() - { - return $this->digestValue; - } - - /** - * Sets a new digestValue - * - * @param mixed $digestValue - * @return self - */ - public function setDigestValue($digestValue) - { - $this->digestValue = $digestValue; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/RetrievalMethod.php b/src/WssWsSecurity/XmlSign/RetrievalMethod.php deleted file mode 100644 index c0c9edf..0000000 --- a/src/WssWsSecurity/XmlSign/RetrievalMethod.php +++ /dev/null @@ -1,13 +0,0 @@ -uRI; - } - - /** - * Sets a new uRI - * - * @param string $uRI - * @return self - */ - public function setURI($uRI) - { - $this->uRI = $uRI; - return $this; - } - - /** - * Gets as type - * - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * Sets a new type - * - * @param string $type - * @return self - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * Adds as transform - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform - * $transform - */ - public function addToTransforms(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform $transform) - { - $this->transforms[] = $transform; - return $this; - } - - /** - * isset transforms - * - * @param scalar $index - * @return boolean - */ - public function issetTransforms($index) - { - return isset($this->transforms[$index]); - } - - /** - * unset transforms - * - * @param scalar $index - * @return void - */ - public function unsetTransforms($index) - { - unset($this->transforms[$index]); - } - - /** - * Gets as transforms - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - */ - public function getTransforms() - { - return $this->transforms; - } - - /** - * Sets a new transforms - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - * $transforms - * @return self - */ - public function setTransforms(array $transforms) - { - $this->transforms = $transforms; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SPKIData.php b/src/WssWsSecurity/XmlSign/SPKIData.php deleted file mode 100644 index 6fb2457..0000000 --- a/src/WssWsSecurity/XmlSign/SPKIData.php +++ /dev/null @@ -1,13 +0,0 @@ -sPKISexp[] = $sPKISexp; - return $this; - } - - /** - * isset sPKISexp - * - * @param scalar $index - * @return boolean - */ - public function issetSPKISexp($index) - { - return isset($this->sPKISexp[$index]); - } - - /** - * unset sPKISexp - * - * @param scalar $index - * @return void - */ - public function unsetSPKISexp($index) - { - unset($this->sPKISexp[$index]); - } - - /** - * Gets as sPKISexp - * - * @return mixed[] - */ - public function getSPKISexp() - { - return $this->sPKISexp; - } - - /** - * Sets a new sPKISexp - * - * @param mixed $sPKISexp - * @return self - */ - public function setSPKISexp(array $sPKISexp) - { - $this->sPKISexp = $sPKISexp; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/Signature.php b/src/WssWsSecurity/XmlSign/Signature.php deleted file mode 100644 index 05afb80..0000000 --- a/src/WssWsSecurity/XmlSign/Signature.php +++ /dev/null @@ -1,13 +0,0 @@ -algorithm; - } - - /** - * Sets a new algorithm - * - * @param string $algorithm - * @return self - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * Gets as hMACOutputLength - * - * @return integer - */ - public function getHMACOutputLength() - { - return $this->hMACOutputLength; - } - - /** - * Sets a new hMACOutputLength - * - * @param integer $hMACOutputLength - * @return self - */ - public function setHMACOutputLength($hMACOutputLength) - { - $this->hMACOutputLength = $hMACOutputLength; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SignatureProperties.php b/src/WssWsSecurity/XmlSign/SignatureProperties.php deleted file mode 100644 index d3836e8..0000000 --- a/src/WssWsSecurity/XmlSign/SignatureProperties.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as signatureProperty - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty - * $signatureProperty - */ - public function addToSignatureProperty(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty $signatureProperty) - { - $this->signatureProperty[] = $signatureProperty; - return $this; - } - - /** - * isset signatureProperty - * - * @param scalar $index - * @return boolean - */ - public function issetSignatureProperty($index) - { - return isset($this->signatureProperty[$index]); - } - - /** - * unset signatureProperty - * - * @param scalar $index - * @return void - */ - public function unsetSignatureProperty($index) - { - unset($this->signatureProperty[$index]); - } - - /** - * Gets as signatureProperty - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty[] - */ - public function getSignatureProperty() - { - return $this->signatureProperty; - } - - /** - * Sets a new signatureProperty - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureProperty[] - * $signatureProperty - * @return self - */ - public function setSignatureProperty(array $signatureProperty) - { - $this->signatureProperty = $signatureProperty; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SignatureProperty.php b/src/WssWsSecurity/XmlSign/SignatureProperty.php deleted file mode 100644 index de83783..0000000 --- a/src/WssWsSecurity/XmlSign/SignatureProperty.php +++ /dev/null @@ -1,13 +0,0 @@ -target; - } - - /** - * Sets a new target - * - * @param string $target - * @return self - */ - public function setTarget($target) - { - $this->target = $target; - return $this; - } - - /** - * Gets as id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SignatureType.php b/src/WssWsSecurity/XmlSign/SignatureType.php deleted file mode 100644 index e90a6d9..0000000 --- a/src/WssWsSecurity/XmlSign/SignatureType.php +++ /dev/null @@ -1,205 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Gets as signedInfo - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo - */ - public function getSignedInfo() - { - return $this->signedInfo; - } - - /** - * Sets a new signedInfo - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo - * $signedInfo - * @return self - */ - public function setSignedInfo(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignedInfo $signedInfo) - { - $this->signedInfo = $signedInfo; - return $this; - } - - /** - * Gets as signatureValue - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue - */ - public function getSignatureValue() - { - return $this->signatureValue; - } - - /** - * Sets a new signatureValue - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue - * $signatureValue - * @return self - */ - public function setSignatureValue(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureValue $signatureValue) - { - $this->signatureValue = $signatureValue; - return $this; - } - - /** - * Gets as keyInfo - * - * @return \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo - */ - public function getKeyInfo() - { - return $this->keyInfo; - } - - /** - * Sets a new keyInfo - * - * @param \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo - * $keyInfo - * @return self - */ - public function setKeyInfo(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\KeyInfo $keyInfo) - { - $this->keyInfo = $keyInfo; - return $this; - } - - /** - * Adds as object - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd - * $object - */ - public function addToObject(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd $object) - { - $this->object[] = $object; - return $this; - } - - /** - * isset object - * - * @param scalar $index - * @return boolean - */ - public function issetObject($index) - { - return isset($this->object[$index]); - } - - /** - * unset object - * - * @param scalar $index - * @return void - */ - public function unsetObject($index) - { - unset($this->object[$index]); - } - - /** - * Gets as object - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd[] - */ - public function getObject() - { - return $this->object; - } - - /** - * Sets a new object - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\ObjectXsd[] - * $object - * @return self - */ - public function setObject(array $object) - { - $this->object = $object; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SignatureValue.php b/src/WssWsSecurity/XmlSign/SignatureValue.php deleted file mode 100644 index 1a65a2b..0000000 --- a/src/WssWsSecurity/XmlSign/SignatureValue.php +++ /dev/null @@ -1,13 +0,0 @@ -value($value); - } - - /** - * Gets or sets the inner value - * - * @param mixed $value - * @return mixed - */ - public function value() - { - if ($args = func_get_args()) { - $this->__value = $args[0]; - } - return $this->__value; - } - - /** - * Gets a string value - * - * @return string - */ - public function __toString() - { - return strval($this->__value); - } - - /** - * Gets as id - * - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/SignedInfo.php b/src/WssWsSecurity/XmlSign/SignedInfo.php deleted file mode 100644 index ecd6260..0000000 --- a/src/WssWsSecurity/XmlSign/SignedInfo.php +++ /dev/null @@ -1,13 +0,0 @@ -id; - } - - /** - * Sets a new id - * - * @param string $id - * @return self - */ - public function setId($id) - { - $this->id = $id; - return $this; - } - - /** - * Gets as canonicalizationMethod - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod - */ - public function getCanonicalizationMethod() - { - return $this->canonicalizationMethod; - } - - /** - * Sets a new canonicalizationMethod - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod - * $canonicalizationMethod - * @return self - */ - public function setCanonicalizationMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\CanonicalizationMethod $canonicalizationMethod) - { - $this->canonicalizationMethod = $canonicalizationMethod; - return $this; - } - - /** - * Gets as signatureMethod - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod - */ - public function getSignatureMethod() - { - return $this->signatureMethod; - } - - /** - * Sets a new signatureMethod - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod - * $signatureMethod - * @return self - */ - public function setSignatureMethod(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\SignatureMethod $signatureMethod) - { - $this->signatureMethod = $signatureMethod; - return $this; - } - - /** - * Adds as reference - * - * @return self - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference - * $reference - */ - public function addToReference(\GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference $reference) - { - $this->reference[] = $reference; - return $this; - } - - /** - * isset reference - * - * @param scalar $index - * @return boolean - */ - public function issetReference($index) - { - return isset($this->reference[$index]); - } - - /** - * unset reference - * - * @param scalar $index - * @return void - */ - public function unsetReference($index) - { - unset($this->reference[$index]); - } - - /** - * Gets as reference - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] - */ - public function getReference() - { - return $this->reference; - } - - /** - * Sets a new reference - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Reference[] - * $reference - * @return self - */ - public function setReference(array $reference) - { - $this->reference = $reference; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/Transform.php b/src/WssWsSecurity/XmlSign/Transform.php deleted file mode 100644 index 7ea687b..0000000 --- a/src/WssWsSecurity/XmlSign/Transform.php +++ /dev/null @@ -1,13 +0,0 @@ -algorithm; - } - - /** - * Sets a new algorithm - * - * @param string $algorithm - * @return self - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * Adds as xPath - * - * @return self - * @param string $xPath - */ - public function addToXPath($xPath) - { - $this->xPath[] = $xPath; - return $this; - } - - /** - * isset xPath - * - * @param scalar $index - * @return boolean - */ - public function issetXPath($index) - { - return isset($this->xPath[$index]); - } - - /** - * unset xPath - * - * @param scalar $index - * @return void - */ - public function unsetXPath($index) - { - unset($this->xPath[$index]); - } - - /** - * Gets as xPath - * - * @return string[] - */ - public function getXPath() - { - return $this->xPath; - } - - /** - * Sets a new xPath - * - * @param string[] $xPath - * @return self - */ - public function setXPath(array $xPath) - { - $this->xPath = $xPath; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/Transforms.php b/src/WssWsSecurity/XmlSign/Transforms.php deleted file mode 100644 index 4e41050..0000000 --- a/src/WssWsSecurity/XmlSign/Transforms.php +++ /dev/null @@ -1,13 +0,0 @@ -transform[] = $transform; - return $this; - } - - /** - * isset transform - * - * @param scalar $index - * @return boolean - */ - public function issetTransform($index) - { - return isset($this->transform[$index]); - } - - /** - * unset transform - * - * @param scalar $index - * @return void - */ - public function unsetTransform($index) - { - unset($this->transform[$index]); - } - - /** - * Gets as transform - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - */ - public function getTransform() - { - return $this->transform; - } - - /** - * Sets a new transform - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\Transform[] - * $transform - * @return self - */ - public function setTransform(array $transform) - { - $this->transform = $transform; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/X509Data.php b/src/WssWsSecurity/XmlSign/X509Data.php deleted file mode 100644 index 57ad629..0000000 --- a/src/WssWsSecurity/XmlSign/X509Data.php +++ /dev/null @@ -1,13 +0,0 @@ -x509IssuerSerial[] = $x509IssuerSerial; - return $this; - } - - /** - * isset x509IssuerSerial - * - * @param scalar $index - * @return boolean - */ - public function issetX509IssuerSerial($index) - { - return isset($this->x509IssuerSerial[$index]); - } - - /** - * unset x509IssuerSerial - * - * @param scalar $index - * @return void - */ - public function unsetX509IssuerSerial($index) - { - unset($this->x509IssuerSerial[$index]); - } - - /** - * Gets as x509IssuerSerial - * - * @return - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType[] - */ - public function getX509IssuerSerial() - { - return $this->x509IssuerSerial; - } - - /** - * Sets a new x509IssuerSerial - * - * @param - * \GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign\X509IssuerSerialType[] - * $x509IssuerSerial - * @return self - */ - public function setX509IssuerSerial(array $x509IssuerSerial) - { - $this->x509IssuerSerial = $x509IssuerSerial; - return $this; - } - - /** - * Adds as x509SKI - * - * @return self - * @param mixed $x509SKI - */ - public function addToX509SKI($x509SKI) - { - $this->x509SKI[] = $x509SKI; - return $this; - } - - /** - * isset x509SKI - * - * @param scalar $index - * @return boolean - */ - public function issetX509SKI($index) - { - return isset($this->x509SKI[$index]); - } - - /** - * unset x509SKI - * - * @param scalar $index - * @return void - */ - public function unsetX509SKI($index) - { - unset($this->x509SKI[$index]); - } - - /** - * Gets as x509SKI - * - * @return mixed[] - */ - public function getX509SKI() - { - return $this->x509SKI; - } - - /** - * Sets a new x509SKI - * - * @param mixed $x509SKI - * @return self - */ - public function setX509SKI(array $x509SKI) - { - $this->x509SKI = $x509SKI; - return $this; - } - - /** - * Adds as x509SubjectName - * - * @return self - * @param string $x509SubjectName - */ - public function addToX509SubjectName($x509SubjectName) - { - $this->x509SubjectName[] = $x509SubjectName; - return $this; - } - - /** - * isset x509SubjectName - * - * @param scalar $index - * @return boolean - */ - public function issetX509SubjectName($index) - { - return isset($this->x509SubjectName[$index]); - } - - /** - * unset x509SubjectName - * - * @param scalar $index - * @return void - */ - public function unsetX509SubjectName($index) - { - unset($this->x509SubjectName[$index]); - } - - /** - * Gets as x509SubjectName - * - * @return string[] - */ - public function getX509SubjectName() - { - return $this->x509SubjectName; - } - - /** - * Sets a new x509SubjectName - * - * @param string[] $x509SubjectName - * @return self - */ - public function setX509SubjectName(array $x509SubjectName) - { - $this->x509SubjectName = $x509SubjectName; - return $this; - } - - /** - * Adds as x509Certificate - * - * @return self - * @param mixed $x509Certificate - */ - public function addToX509Certificate($x509Certificate) - { - $this->x509Certificate[] = $x509Certificate; - return $this; - } - - /** - * isset x509Certificate - * - * @param scalar $index - * @return boolean - */ - public function issetX509Certificate($index) - { - return isset($this->x509Certificate[$index]); - } - - /** - * unset x509Certificate - * - * @param scalar $index - * @return void - */ - public function unsetX509Certificate($index) - { - unset($this->x509Certificate[$index]); - } - - /** - * Gets as x509Certificate - * - * @return mixed[] - */ - public function getX509Certificate() - { - return $this->x509Certificate; - } - - /** - * Sets a new x509Certificate - * - * @param mixed $x509Certificate - * @return self - */ - public function setX509Certificate(array $x509Certificate) - { - $this->x509Certificate = $x509Certificate; - return $this; - } - - /** - * Adds as x509CRL - * - * @return self - * @param mixed $x509CRL - */ - public function addToX509CRL($x509CRL) - { - $this->x509CRL[] = $x509CRL; - return $this; - } - - /** - * isset x509CRL - * - * @param scalar $index - * @return boolean - */ - public function issetX509CRL($index) - { - return isset($this->x509CRL[$index]); - } - - /** - * unset x509CRL - * - * @param scalar $index - * @return void - */ - public function unsetX509CRL($index) - { - unset($this->x509CRL[$index]); - } - - /** - * Gets as x509CRL - * - * @return mixed[] - */ - public function getX509CRL() - { - return $this->x509CRL; - } - - /** - * Sets a new x509CRL - * - * @param mixed $x509CRL - * @return self - */ - public function setX509CRL(array $x509CRL) - { - $this->x509CRL = $x509CRL; - return $this; - } - - /** - * Adds as array - * - * @return self - * @param mixed $array - */ - public function addToAnyElement($array) - { - $this->anyElement[] = $array; - return $this; - } - - /** - * isset anyElement - * - * @param scalar $index - * @return boolean - */ - public function issetAnyElement($index) - { - return isset($this->anyElement[$index]); - } - - /** - * unset anyElement - * - * @param scalar $index - * @return void - */ - public function unsetAnyElement($index) - { - unset($this->anyElement[$index]); - } - - /** - * Gets as anyElement - * - * @return mixed[] - */ - public function getAnyElement() - { - return $this->anyElement; - } - - /** - * Sets a new anyElement - * - * @param mixed[] $anyElement - * @return self - */ - public function setAnyElement(array $anyElement) - { - $this->anyElement = $anyElement; - return $this; - } - - -} - diff --git a/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php b/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php deleted file mode 100644 index 8e99d95..0000000 --- a/src/WssWsSecurity/XmlSign/X509IssuerSerialType.php +++ /dev/null @@ -1,70 +0,0 @@ -x509IssuerName; - } - - /** - * Sets a new x509IssuerName - * - * @param string $x509IssuerName - * @return self - */ - public function setX509IssuerName($x509IssuerName) - { - $this->x509IssuerName = $x509IssuerName; - return $this; - } - - /** - * Gets as x509SerialNumber - * - * @return integer - */ - public function getX509SerialNumber() - { - return $this->x509SerialNumber; - } - - /** - * Sets a new x509SerialNumber - * - * @param integer $x509SerialNumber - * @return self - */ - public function setX509SerialNumber($x509SerialNumber) - { - $this->x509SerialNumber = $x509SerialNumber; - return $this; - } - - -} - diff --git a/tests/Client/BuildClientTest.php b/tests/Client/BuildClientTest.php index 3216764..aab1d47 100644 --- a/tests/Client/BuildClientTest.php +++ b/tests/Client/BuildClientTest.php @@ -18,16 +18,20 @@ class BuildClientTest extends \PHPUnit_Framework_TestCase */ protected $factory; + protected static $namespaces = [ + 'http://www.example.org/test/' => "Ex", + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext', + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility', + 'http://www.w3.org/2000/09/xmldsig#' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign', + ]; + public function setUp() { - $namespaces = [ - 'http://www.example.org/test/' => "Ex" - ]; - $generator = new Generator($namespaces); + $generator = new Generator(self::$namespaces); $serializer = $generator->buildSerializer(); $naming = new ShortNamingStrategy(); - $metadataGenerator = new MetadataGenerator($naming, $namespaces); + $metadataGenerator = new MetadataGenerator($naming, self::$namespaces); $dispatcher = new EventDispatcher(); $wsdlReader = new DefinitionsReader(null, $dispatcher); diff --git a/tests/Client/Client12RequestResponsesTest.php b/tests/Client/Client12RequestResponsesTest.php index 4c84a5f..d3a3fe6 100644 --- a/tests/Client/Client12RequestResponsesTest.php +++ b/tests/Client/Client12RequestResponsesTest.php @@ -28,7 +28,10 @@ class Client12RequestResponsesTest extends \PHPUnit_Framework_TestCase { protected static $namespaces = [ - 'http://www.example.org/test/' => "Ex" + 'http://www.example.org/test/' => "Ex", + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext', + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility', + 'http://www.w3.org/2000/09/xmldsig#' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign', ]; /** * @var Generator diff --git a/tests/Client/ClientRequestResponsesTest.php b/tests/Client/ClientRequestResponsesTest.php index 87576a9..ff1eb1a 100644 --- a/tests/Client/ClientRequestResponsesTest.php +++ b/tests/Client/ClientRequestResponsesTest.php @@ -28,7 +28,10 @@ class ClientRequestResponsesTest extends \PHPUnit_Framework_TestCase { protected static $namespaces = [ - 'http://www.example.org/test/' => "Ex" + 'http://www.example.org/test/' => "Ex", + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext', + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility', + 'http://www.w3.org/2000/09/xmldsig#' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign', ]; /** * @var Generator diff --git a/tests/Fixtures/clientcert.pem b/tests/Fixtures/clientcert.pem new file mode 100644 index 0000000..f433d48 --- /dev/null +++ b/tests/Fixtures/clientcert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICoDCCAgkCBEnhw2IwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMw +EQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEq +MCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYD +VQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEy +MTAzMzA2WhcNMzYwODI3MTAzMzA2WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgT +CldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQK +EyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vu +a25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEF +AAOBjQAwgYkCgYEAhOVyNK8xyxtb4DnKtU6mF9KoiFqCk7eKoLE26+9h410CtTkx +zWAfgnR+8i+LPbdsPY+yXAo6NYpCCKolXfDLe+AG2GwnMZGrIl6+BLF3hqTmIXBF +TLGUmC7A7uBTivaWgdH1w3hb33rASoVU67BVtQ3QQi99juZX4vU9o9pScocCAwEA +ATANBgkqhkiG9w0BAQUFAAOBgQBMNPo1KAGbz8Jl6HGbtAcetieSJ3bEAXmv1tcj +ysBS67AXzdu1Ac+onHh2EpzBM7kuGbw+trU+AhulooPpewIQRApXP1F0KHRDcbqW +jwvknS6HnomN9572giLGKn2601bHiRUj35hiA8aLmMUBppIRPFFAoQ0QUBCPx+m8 +/0n33w== +-----END CERTIFICATE----- diff --git a/tests/Fixtures/clientkey.pem b/tests/Fixtures/clientkey.pem new file mode 100644 index 0000000..a47f923 --- /dev/null +++ b/tests/Fixtures/clientkey.pem @@ -0,0 +1,14 @@ +-----BEGIN PRIVATE KEY----- +MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAITlcjSvMcsbW+A5yrVOphfSqIha +gpO3iqCxNuvvYeNdArU5Mc1gH4J0fvIviz23bD2PslwKOjWKQgiqJV3wy3vgBthsJzGRqyJevgSx +d4ak5iFwRUyxlJguwO7gU4r2loHR9cN4W996wEqFVOuwVbUN0EIvfY7mV+L1PaPaUnKHAgMBAAEC +gYAZ6UqtLwN8YGc3fs0hMKZ9upsViuAuwPiMgED/G3twgzAF+ZLWQkmie+hMfCyf6eV200+pVm0n +Bz/8xH/oowxpX0Kk3szoB4vFghjU84GKUcrbhu/NRIm7l3drnfbzqhQkHDCx6n1CotI4Gs49cDWu +4uEAuxJkEIVY553unZjZgQJBAOJVIallNKmD0iQlvtWRmRzpmYDjt9vhNY6WBTIOx6SDn9SRaoSA +fkipQ2HXo04r78TQ674+zfZ1lRTkFG7px6ECQQCWUPHp3pSZOM1oGzJrNvNaw+MizZAZjq34npHm +9GRquFLG7BlCaI9QNGE7pN2ryYsYCRUMaM2e4GR0tUXxVGknAkAgrxqFU9AfCqI2Bh1gyf3KZxF7 +w2axofwR8ygc6nV6FGfoUneHWubhp0/LuVAj4cRmL6Vbe8ZSaPh2Y9lviuMBAkEAicP8Q+1E4j1m +PPEYP51oYprANOiUFmhnWEL00+jPk+QFsd03tV6hYs/vAbwzkjuwqMHCMdJoCiH8z95IEUvc5wJA +MvLOuZdu4dmhOXg/YKsbMSPjFNEVskLQNSXqw6O2wIrpPg1NQvBBAOTbiuZj3vind4VPos1wc4vB +QocvdUC6dA== +-----END PRIVATE KEY----- diff --git a/tests/Fixtures/config.yml b/tests/Fixtures/config.yml index 3d06155..41b00cf 100644 --- a/tests/Fixtures/config.yml +++ b/tests/Fixtures/config.yml @@ -6,14 +6,27 @@ soap_client: port: xxx namespaces: 'http://www.example.org/test/': 'TestNs' + + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext' + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility' + 'http://www.w3.org/2000/09/xmldsig#': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign' + destinations_php: 'TestNs': soap/src + + 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': null + destinations_jms: 'TestNs\SoapEnvelope12': soap/metadata/soap-env-12 'TestNs\SoapEnvelope': soap/metadata/soap-env-11 'TestNs\SoapParts': soap/metadata/soap-parts 'TestNs': soap/metadata + + 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': null + aliases: 'http://www.example.org/test/': responseHeaderMessagesResponse: 'HeaderResponse' + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': + Security: GoetasWebservices\SoapServices\SoapEnvelope\Headers diff --git a/tests/Fixtures/servercert.pem b/tests/Fixtures/servercert.pem new file mode 100644 index 0000000..040b22c --- /dev/null +++ b/tests/Fixtures/servercert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICoDCCAgkCBEnhwzMwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMw +EQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEq +MCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYD +VQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEy +MTAzMjE5WhcNMzYwODI3MTAzMjE5WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgT +CldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQK +EyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vu +a25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEF +AAOBjQAwgYkCgYEA1H3mjQCF9uce2jmm/Yq9kE4ytfvkp4c8G90cDfJXJvOiGQds +p2vDZXKuCkHQ7vsBBXPNTt8J/d8ZbEwyuB9Ccz5pJqi6Ig6Y2/mEsPthDyh5SrJV +yQ/wxUGwmfSuwdrIMnplMTq+OR9BOfT3CvjSvuy9d6BQNo4wOMkDvmZTtI8CAwEA +ATANBgkqhkiG9w0BAQUFAAOBgQCqv4475QaqlKcN2QCZJbLVKZEX+76XLQurGkgf +2fCgesRHjfUfOHyTTlhWQdEKTcBB2XviUyyW6I//fmKfXUIiQqvgh4LHdXRPEXDf +Y9nr89MjyQpDlnl6AlrvSej30a9iwVRUeVk4d6gxWHMRonKBFgh+TGexxUXHtPkf +B1Pdtg== +-----END CERTIFICATE----- diff --git a/tests/Fixtures/test.wsdl b/tests/Fixtures/test.wsdl index 84cf392..794d192 100644 --- a/tests/Fixtures/test.wsdl +++ b/tests/Fixtures/test.wsdl @@ -2,9 +2,19 @@ + + + + + + + + @@ -197,9 +207,27 @@ + + + + + + + + + + + + + + + + + + @@ -286,6 +314,12 @@ + + + + + + @@ -334,6 +368,10 @@ + + + + @@ -345,123 +383,152 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -582,6 +649,19 @@ + + + + + + + + + + + + diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index 1f3ee7b..744b772 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -2,18 +2,22 @@ namespace GoetasWebservices\SoapServices\SoapClient\Tests\Serializer; +use Ex\SoapEnvelope12\Messages\RequestHeaderInput; +use Ex\SoapParts\RequestHeadersInput; use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\Handler\HeaderHandler; +use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\Handler\HeaderPlaceholder; +use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\MustUnderstandHeader; use GoetasWebservices\SoapServices\SoapClient\Envelope\Handler\FaultHandler; -use GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope\Messages\Fault as Fault11; use GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12\Messages\Fault as Fault12; use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\SecurityKeyPair; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WsSecurityFilterRequest; use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WssSecurityHeaderEventHandler; use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WssSecurityHeaderHandler; use GoetasWebservices\WsdlToPhp\Tests\Generator; use JMS\Serializer\EventDispatcher\EventDispatcher; use JMS\Serializer\Handler\HandlerRegistryInterface; use JMS\Serializer\Serializer; -use Zend\Stdlib\DateTime; class WssSecurityTest extends \PHPUnit_Framework_TestCase { @@ -22,61 +26,98 @@ class WssSecurityTest extends \PHPUnit_Framework_TestCase */ protected $serializer; + + /** + * @var HeaderHandler + */ + protected $headerHandler; + protected static $generator; + protected static $namespaces = [ + 'http://www.example.org/test/' => "Ex", + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext', + 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility', + 'http://www.w3.org/2000/09/xmldsig#' => 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign', + ]; + + + public static function setUpBeforeClass() + { + self::$generator = new Generator(self::$namespaces); + self::$generator->generate([__DIR__ . '/../Fixtures/test.wsdl']); + self::$generator->registerAutoloader(); + } + + public static function tearDownAfterClass() + { + self::$generator->unRegisterAutoloader(); + //self::$generator->cleanDirectories(); + } + public function setUp() { - $generator = new Generator([]); + $generator = self::$generator; $ref = new \ReflectionClass(Fault12::class); - $headerHandler = new HeaderHandler(); - $this->serializer = $generator->buildSerializer(function (HandlerRegistryInterface $h) use ($headerHandler) { - $h->registerSubscribingHandler($headerHandler); - $h->registerSubscribingHandler(new FaultHandler()); - $sechandler = new WssSecurityHeaderHandler(); - $sechandler->setNonce('xx'); + $this->headerHandler = new HeaderHandler(); + $this->serializer = $generator->buildSerializer(function (HandlerRegistryInterface $h) { + $h->registerSubscribingHandler($this->headerHandler); + $hr = new WsSecurityFilterRequest(); + + $keypair = new SecurityKeyPair(); + $filename = __DIR__.'/../Fixtures/clientkey.pem'; + $keypair->setPrivateKey(\ass\XmlSecurity\Key::RSA_SHA1, $filename); + $filename = __DIR__.'/../Fixtures/clientcert.pem'; + $keypair->setPublicKey(\ass\XmlSecurity\Key::RSA_SHA1, $filename); + + $hr->setUserSecurityKeyObject($keypair); + + + $keypair = new SecurityKeyPair(); + $keypair->setPrivateKey(\ass\XmlSecurity\Key::TRIPLEDES_CBC); + $keypair->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/servercert.pem'); + + $hr->setServiceSecurityKeyObject($keypair); + + + $sechandler = new WssSecurityHeaderHandler($hr); $h->registerSubscribingHandler($sechandler); }, [ 'GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12' => dirname($ref->getFileName()) . '/../../../Resources/metadata/jms12', - 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity' => dirname($ref->getFileName()) . '/../../../Resources/metadata/wss-ws-security', - ], function(EventDispatcher $ev) { - $ev->addSubscriber(new WssSecurityHeaderEventHandler()); - }); + ]); } public function testSerializeSecurity() { - $wssec = new Security(); - $wssec->setUsername('foo'); - $wssec->setPassword('bar'); - $wssec->setTimestamp(new \DateTime('2010-01-01 00:00:00', new \DateTimeZone('UTC'))); + $headerPlaceholder = new HeaderPlaceholder(); - $xml = $this->serializer->serialize($wssec, 'xml'); - $this->assertXmlStringEqualsXmlString(' - - - - - - - - - - - - ', $xml); - } + $security = new Security(); + $security->setUsername('foo'); + $security->setPassword('pass'); - public function testUnserialize() - { - $wssec = new Security(); - $wssec->setUsername('foo'); - $wssec->setPassword('bar'); - $wssec->setTimestamp(new \DateTime('2010-01-01 00:00:00', new \DateTimeZone('UTC'))); + $auth = new \Ex\AuthHeader(); + $auth->setUser('bar'); + + $this->headerHandler->addHeaderData($headerPlaceholder, new MustUnderstandHeader($security)); + $this->headerHandler->addHeaderData($headerPlaceholder, new MustUnderstandHeader($auth)); + + $env = new RequestHeaderInput(); + $env->setHeader($headerPlaceholder); + + $body = new \Ex\SoapParts\RequestHeaderInput(); + $p = new \Ex\RequestHeader(); + $p->setIn("sss"); + $body->setParameters($p); + $env->setBody($body); + + + $xml = $this->serializer->serialize($env, 'xml'); - $xml = $this->serializer->serialize($wssec, 'xml'); + echo $xml; + return; $this->assertXmlStringEqualsXmlString(' diff --git a/ws-security/config.yml b/ws-security/config.yml deleted file mode 100644 index d518823..0000000 --- a/ws-security/config.yml +++ /dev/null @@ -1,16 +0,0 @@ -xsd2php: - namespaces: - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext' - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility' - 'http://www.w3.org/2000/09/xmldsig#': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign' - destinations_php: - 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': src/WssWsSecurity - destinations_jms: - 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': src/Resources/metadata/wss-ws-security - known_locations: - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd - 'https://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd': ws-security/xmldsig-core-schema.xsd - 'http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd': ws-security/xmldsig-core-schema.xsd - any_element: true - any_attribute: true diff --git a/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd b/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd deleted file mode 100644 index 7596dc5..0000000 --- a/ws-security/oasis-200401-wss-wssecurity-secext-1.0.xsd +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - This type represents an element with arbitrary attributes. - - - - - - - - - - - This type is used for password elements per Section 4.1. - - - - - - - - - - This type is used for elements containing stringified binary data. - - - - - - - - - - This type represents a username token per Section 4.1 - - - - - - - - - - - A security token that is encoded in binary - - - - - - - - - - A security token key identifier - - - - - - - - - - Typedef to allow a list of usages (as URIs). - - - - - - This global attribute is used to indicate the usage of a referenced or indicated token within the containing context - - - - - This type represents a reference to an external security token. - - - - - - - - This type represents a reference to an embedded security token. - - - - - - - - - - This type is used reference a security token. - - - - - - - - - - - This complexType defines header block to use for security-relevant data directed at a specific SOAP actor. - - - - - The use of "any" is to allow extensibility and different forms of security data. - - - - - - - - This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation. - - - - - The use of "any" is to allow extensibility from any namespace. - - - - - - - - This element defines the wsse:UsernameToken element per Section 4.1. - - - - - This element defines the wsse:BinarySecurityToken element per Section 4.2. - - - - - This element defines a security token reference - - - - - This element defines a security token embedded reference - - - - - This element defines a key identifier reference - - - - - This element defines the wsse:SecurityTokenReference per Section 4.3. - - - - - This element defines the wsse:Security SOAP header element per Section 4. - - - - - This element contains properties for transformations from any namespace, including DSIG. - - - - - - - - - - - - - - - - diff --git a/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd b/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd deleted file mode 100644 index e088d13..0000000 --- a/ws-security/oasis-200401-wss-wssecurity-utility-1.0.xsd +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - -This type defines the fault code value for Timestamp message expiration. - - - - - - - - - - -This global attribute supports annotating arbitrary elements with an ID. - - - - - - -Convenience attribute group used to simplify this schema. - - - - - - - - - -This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. - - - - - - - - - - - -This type is for elements whose [children] is an anyURI and can have arbitrary attributes. - - - - - - - - - - - - -This complex type ties together the timestamp related elements into a composite type. - - - - - - - - - - - - - - -This element allows Timestamps to be applied anywhere element wildcards are present, -including as a SOAP header. - - - - - - - -This element allows an expiration time to be applied anywhere element wildcards are present. - - - - - - -This element allows a creation time to be applied anywhere element wildcards are present. - - - - diff --git a/ws-security/xmldsig-core-schema.xsd b/ws-security/xmldsig-core-schema.xsd deleted file mode 100644 index e28dca5..0000000 --- a/ws-security/xmldsig-core-schema.xsd +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 979c26e45dff05db40bf9ec73dfdf369b762b1ae Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 18:10:03 +0100 Subject: [PATCH 05/17] no explicit wss Ref: http://stackoverflow.com/questions/5726127/adding-soap-implicit-headers-to-wsdl From a conceptual point of view, WSDL is not supposed to define headers. WSDL is only for defining the functional aspects of a service, like operations, messages, binding and endpoints. Messages and bindings define how the payload of messages should be encoded and formatted. The headers of SOAP messages however do not belong to the payload. They are typically used for configuring non-functional properties of a SOAP processor. Security is such a non-functional property. The functional aspect of the payload is not affected. It is only assured that the communication is secured and the WS tool stack, not the service implementation, should take care of that. So the missing piece is now a standard that allows for attaching some non-functional requirements to WSDL services, so that code generators can automatically derive which headers need to be sent and/or understand in order to fulfill the non-functional property as desired -- without having to manually deal with header fields. This standard exists and is called WS-Policy. A policy contains typically a set of alternatives that expose a set of requirements that both, provider and consumer should be able to fulfill. When two services are supposed to interact with each other, both policies are taken and a so called "effective policy" is calculated. It defines the common non-functional requirements. Using this information, provider and consumer can configure themselves to add required headers, like the WS-Security headers. WS-SecurityPolicy also defines a set of policies that can be used. WS-PolicyAttachment defines how such policies can be attached to a WSDL. There are code generators that can deal with WS-Policies, e.g. Metro or Axis2 --- tests/Fixtures/config.yml | 11 ------- tests/Fixtures/test.wsdl | 60 --------------------------------------- 2 files changed, 71 deletions(-) diff --git a/tests/Fixtures/config.yml b/tests/Fixtures/config.yml index 41b00cf..8377ae0 100644 --- a/tests/Fixtures/config.yml +++ b/tests/Fixtures/config.yml @@ -6,27 +6,16 @@ soap_client: port: xxx namespaces: 'http://www.example.org/test/': 'TestNs' - - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Secext' - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Utility' - 'http://www.w3.org/2000/09/xmldsig#': 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\XmlSign' - destinations_php: 'TestNs': soap/src - 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': null - destinations_jms: 'TestNs\SoapEnvelope12': soap/metadata/soap-env-12 'TestNs\SoapEnvelope': soap/metadata/soap-env-11 'TestNs\SoapParts': soap/metadata/soap-parts 'TestNs': soap/metadata - 'GoetasWebservices\SoapServices\SoapClient\WssWsSecurity': null - aliases: 'http://www.example.org/test/': responseHeaderMessagesResponse: 'HeaderResponse' - 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd': - Security: GoetasWebservices\SoapServices\SoapEnvelope\Headers diff --git a/tests/Fixtures/test.wsdl b/tests/Fixtures/test.wsdl index 794d192..933a8eb 100644 --- a/tests/Fixtures/test.wsdl +++ b/tests/Fixtures/test.wsdl @@ -4,17 +4,8 @@ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" - xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" name="test" targetNamespace="http://www.example.org/test/"> - - - - - - - - @@ -207,26 +198,8 @@ - - - - - - - - - - - - - - - - - - @@ -314,12 +287,6 @@ - - - - - - @@ -368,10 +335,6 @@ - - - - @@ -518,17 +481,6 @@ - - - - - - - - - - @@ -649,18 +601,6 @@ - - - - - - - - - - - From d5a17a6facd41cb58e7f7416760b6b50463f1793 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 18:35:39 +0100 Subject: [PATCH 06/17] updated deps --- composer.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 42934b7..b260919 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,9 @@ "require-dev": { "phpunit/phpunit": "^4.8|^5.0", - "goetas-webservices/wsdl2php": "^0.3", + "goetas-webservices/wsdl2php": "^0.4", + "goetas-webservices/xsd2php": "^0.2.3", + "goetas-webservices/wsdl-reader": "^v0.3.1", "php-http/guzzle6-adapter": "^1.0", From 1fc187a7e8f2e09d9822057756a1d2aa345fa9fa Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 18:44:46 +0100 Subject: [PATCH 07/17] removed "any" support --- src/DependencyInjection/SoapClientExtension.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/DependencyInjection/SoapClientExtension.php b/src/DependencyInjection/SoapClientExtension.php index dff84c8..74afc9c 100644 --- a/src/DependencyInjection/SoapClientExtension.php +++ b/src/DependencyInjection/SoapClientExtension.php @@ -45,14 +45,8 @@ public function load(array $configs, ContainerBuilder $container) $converter = $container->getDefinition('goetas_webservices.xsd2php.converter.' . $type); - $converter->addMethodCall('setOutputAnyAttribute', [$config['any_attribute']]); - $converter->addMethodCall('setOutputAnyElement', [$config['any_element']]); - $converterWsdl = $container->getDefinition('goetas_webservices.wsdl2php.converter.' . $type); - $converterWsdl->addMethodCall('setOutputAnyAttribute', [$config['any_attribute']]); - $converterWsdl->addMethodCall('setOutputAnyElement', [$config['any_element']]); - foreach ($config['namespaces'] as $xml => $php) { $converter->addMethodCall('addNamespace', [$xml, self::sanitizePhp($php)]); } From b734ac5f648f45aff64743a1478625a72e40173f Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 18:48:14 +0100 Subject: [PATCH 08/17] added ass/xmlsecurity dependency --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b260919..88eb8e4 100644 --- a/composer.json +++ b/composer.json @@ -28,8 +28,11 @@ "goetas-webservices/wsdl-reader": "^v0.3.1", - "php-http/guzzle6-adapter": "^1.0", - "php-http/message": "^1.0" + "ass/xmlsecurity" : "^1.0", + "php-http/guzzle6-adapter": "^1.0" + }, + "suggest": { + "ass/xmlsecurity" : "Required for WS Security features" }, "autoload": { "psr-4": { From b7f26d789d86115e6920136636d1c538470bba5b Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 19:04:44 +0100 Subject: [PATCH 09/17] temporary composer dep for development version of jms serializer --- composer.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 88eb8e4..978b67c 100644 --- a/composer.json +++ b/composer.json @@ -26,6 +26,8 @@ "goetas-webservices/wsdl2php": "^0.4", "goetas-webservices/xsd2php": "^0.2.3", + "jms/serializer": "dev-xml-namespaces-improvements as 1.5.0", + "goetas-webservices/wsdl-reader": "^v0.3.1", "ass/xmlsecurity" : "^1.0", From 31874dc56c0949aa8825500c2a81346b403fb2a5 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 19:11:29 +0100 Subject: [PATCH 10/17] removed deps by mistake --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 978b67c..5e47dbb 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,8 @@ "goetas-webservices/wsdl-reader": "^v0.3.1", "ass/xmlsecurity" : "^1.0", - "php-http/guzzle6-adapter": "^1.0" + "php-http/guzzle6-adapter": "^1.0", + "php-http/message": "^1.0" }, "suggest": { "ass/xmlsecurity" : "Required for WS Security features" From f4fa83e808b07b77e2a03da82c27cbb7b8d96cf4 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 19:22:32 +0100 Subject: [PATCH 11/17] basic test --- tests/Serializer/WssSecurityTest.php | 99 +++++++++++++++++++++++----- 1 file changed, 81 insertions(+), 18 deletions(-) diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index 744b772..e7bb2db 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -112,26 +112,89 @@ public function testSerializeSecurity() $body->setParameters($p); $env->setBody($body); - $xml = $this->serializer->serialize($env, 'xml'); - - echo $xml; - return; - $this->assertXmlStringEqualsXmlString(' - - - - - - - - - - - - ', $xml); + $expectedString = ' + + + + + + + + + + + wZt0/BXw53bz2Ni1WI1U4UhzPP8jlVPW7K29/wDZDm9/j/KA4D7e2GaAH4GPHSYZ2foadJKSWPaqJP+RsATV8LpGSeLLCoFjx2aYI371xFQu1/SJRuaRKpW8YKYarISSEWcPpVcAjgGBz8rRqoXCd6CZ8XmTTt4AIvXdiQfqsKyBoFYyGsItdoA3qWqXix1/Or1K/MHMd22NC6wJRdLksV+m/ulzbm+NdKvVomGCOxAaGtvk+buCLLskqXo+mQd4Ox2c8Qabh3MPz8tdmabq1JI7pmgx0HVaZS2VJTvimcwCJ1v90AJFz/78ue61FI74DSGCoYGOHnAttWQTcZxJpCqVLbPFjLm7i2an+OAVhD5cdObxi/NsPAzVMIM+fWaN0+r7xCeNplukj5Q40UH7V8jLKAn3PwEgIs2ld+Dn6BYbfkxqvIhEQwjyfm9pwWsEs1H4EY0YqAWtR91Ioxr/ZU1ojjtrBXc56VRB327gLKPnecDEQaycAVKK4EnnbOAldfkbS99MxrwBkADSsVgfQEar5ZhWuA7nD+HphvRjDJmpO1NuWeMBLOL7SuFMZBn5uRvO4G8plkC9x2gOVCRRRMTLHUUB2CLTS7h6ETHrwOI= + + + + + + + 2016-12-20T18:12:12.000Z + 2016-12-20T18:17:12.000Z + + + foo + + MIICoDCCAgkCBEnhw2IwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMwEQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEqMCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYDVQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEyMTAzMzA2WhcNMzYwODI3MTAzMzA2WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgTCldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQKEyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vua25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAhOVyNK8xyxtb4DnKtU6mF9KoiFqCk7eKoLE26+9h410CtTkxzWAfgnR+8i+LPbdsPY+yXAo6NYpCCKolXfDLe+AG2GwnMZGrIl6+BLF3hqTmIXBFTLGUmC7A7uBTivaWgdH1w3hb33rASoVU67BVtQ3QQi99juZX4vU9o9pScocCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBMNPo1KAGbz8Jl6HGbtAcetieSJ3bEAXmv1tcjysBS67AXzdu1Ac+onHh2EpzBM7kuGbw+trU+AhulooPpewIQRApXP1F0KHRDcbqWjwvknS6HnomN9572giLGKn2601bHiRUj35hiA8aLmMUBppIRPFFAoQ0QUBCPx+m8/0n33w== + + + + e4q/136uZJjLsvgqBz93BLgtHHgg7CBkJ8XdezFfsu2nBLtm5Z27499rUJafreJ8FNZC2VxZAb7aaTWX1gOU/eAEq4KA2pmw0ZlsEZo+wubzc0ncPrQYRadKYiFFGt543Wx3LLd+A68T38JUbUNv0DjSEiVC3+FHvVuaOOttydE= + + + + + + + + + + + + + + + Gh5gQXLbHDOZm/x5mpOrhOid3zE= + + + + + + + 2jmj7l5rSw0yVb/vlWAYkK/YBwk= + + + + + + + 2jmj7l5rSw0yVb/vlWAYkK/YBwk= + + + cslBnIZq7zBc7F0ZQa1zXrhsTA6S6mcpDLIdpPZgWCsN4VqmWQrgJCCkcoxoUSTqYeeJfHdnGiG3//hPFidEIMkWQKzgxzMIzskTXNuA6dPcQ58w6euAVgWrwhetcXzGtk/iVNHSaoHGEsGJjubt1d7PbuTo7j/Ov4VXWilKCSw= + + + + + + +'; + + $this->assertXmlStringEqualsXmlString($this->cleanXML($expectedString), $this->cleanXML($xml)); } - + public function cleanXML($xml) + { + $xml = preg_replace('~(Id|EncKey|Cert|\#)[a-f0-9\-]+~', '', $xml); + $xml = preg_replace('~\d{4}\-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*Z~', '', $xml); + + $tags = ['dsig:SignatureValue', 'dsig:DigestValue', 'xenc:CipherValue']; + foreach ($tags as $tag) { + $xml = preg_replace("~<$tag>.*?<\\/$tag>~", '', $xml); + } + return $xml; + } } From ded328669f22d359ed55246a5d9c2d1d6206b538 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 19:28:44 +0100 Subject: [PATCH 12/17] fixed test failures --- tests/Client/Client12RequestResponsesTest.php | 24 +++++++++---------- tests/Client/ClientRequestResponsesTest.php | 24 +++++++++---------- tests/example.php | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/tests/Client/Client12RequestResponsesTest.php b/tests/Client/Client12RequestResponsesTest.php index d3a3fe6..0f93d94 100644 --- a/tests/Client/Client12RequestResponsesTest.php +++ b/tests/Client/Client12RequestResponsesTest.php @@ -105,7 +105,7 @@ public function testGetSimple() { $httpResponse = new Response(200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -127,7 +127,7 @@ public function testGetSimpleUnwrapped() { $httpResponse = new Response(200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -158,7 +158,7 @@ public function testHeaders() { $httpResponse = new Response(200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -177,12 +177,12 @@ public function testHeaders() $client->getSimple("foo", new MustUnderstandHeader($mp)); $this->assertXmlStringEqualsXmlString( ' - + - + @@ -192,12 +192,12 @@ public function testHeaders() $this->assertXmlStringEqualsXmlString( ' - + - + @@ -253,7 +253,7 @@ public function testNoInput() $this->responseMock->append( new Response(200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -295,7 +295,7 @@ public function testReturnMultiParam() 200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -316,7 +316,7 @@ public function testReturnMultiParam() $this->assertXmlStringEqualsXmlString( ' - + @@ -332,7 +332,7 @@ public function testMultiParamRequest() 200, ['Content-Type' => 'application/soap+xml'], ' - + @@ -348,7 +348,7 @@ public function testMultiParamRequest() $this->assertXmlStringEqualsXmlString( ' - + diff --git a/tests/Client/ClientRequestResponsesTest.php b/tests/Client/ClientRequestResponsesTest.php index ff1eb1a..3490b28 100644 --- a/tests/Client/ClientRequestResponsesTest.php +++ b/tests/Client/ClientRequestResponsesTest.php @@ -105,7 +105,7 @@ public function testGetSimple() { $httpResponse = new Response(200, ['Content-Type' => 'text/xml'], ' - + @@ -127,7 +127,7 @@ public function testGetSimpleUnwrapped() { $httpResponse = new Response(200, ['Content-Type' => 'text/xml'], ' - + @@ -158,7 +158,7 @@ public function testHeaders() { $httpResponse = new Response(200, ['Content-Type' => 'text/xml'], ' - + @@ -177,12 +177,12 @@ public function testHeaders() $client->getSimple("foo", new MustUnderstandHeader($mp)); $this->assertXmlStringEqualsXmlString( ' - + - + @@ -192,12 +192,12 @@ public function testHeaders() $this->assertXmlStringEqualsXmlString( ' - + - + @@ -225,7 +225,7 @@ public function testNoInput() $this->responseMock->append( new Response(200, ['Content-Type' => 'text/xml'], ' - + @@ -267,7 +267,7 @@ public function testReturnMultiParam() 200, ['Content-Type' => 'text/xml'], ' - + @@ -288,7 +288,7 @@ public function testReturnMultiParam() $this->assertXmlStringEqualsXmlString( ' - + @@ -304,7 +304,7 @@ public function testMultiParamRequest() 200, ['Content-Type' => 'text/xml'], ' - + @@ -320,7 +320,7 @@ public function testMultiParamRequest() $this->assertXmlStringEqualsXmlString( ' - + diff --git a/tests/example.php b/tests/example.php index d7809b9..51f78da 100644 --- a/tests/example.php +++ b/tests/example.php @@ -26,7 +26,7 @@ $responseMock = new MockHandler(); $httpResponse = new Response(200, ['Content-Type' => 'text/xml'], ' - + From 6a0e45de67ab5f9aa75e8789e34af9a3f6131d38 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Tue, 20 Dec 2016 19:32:28 +0100 Subject: [PATCH 13/17] updated readme about ws security --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index dbe3704..8f4fe7a 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ The recommended way to install goetas-webservices / soap-client is using [Compos ``` composer require goetas-webservices/soap-client composer require goetas-webservices/wsdl2php --dev + +# to use WS Security +composer require ass/xmlsecurity ``` More dependencies might be needed depending on your PSR-7 and HTTP client preferred implementation. From 74bdbb786c86a23f170cb418a3f26cb608e162ea Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Wed, 21 Dec 2016 15:25:52 +0100 Subject: [PATCH 14/17] improved and tested message decryption and signature verification --- .../Exception/ClientException.php | 9 + .../AbstractWsSecurityFilter.php | 8 +- .../WsSecurityFilterRequest.php | 64 +-- .../WsSecurityFilterResponse.php | 18 +- .../WssSecurityHeaderEventListener.php | 48 +++ .../WssSecurityHeaderHandler.php | 24 +- tests/Fixtures/client_private_key.pem | 16 + tests/Fixtures/client_public_key.pem | 6 + tests/Fixtures/clientcert.pem | 17 - tests/Fixtures/clientkey.pem | 14 - tests/Fixtures/server_private_key.pem | 16 + tests/Fixtures/server_public_key.pem | 6 + tests/Fixtures/servercert.pem | 17 - tests/Serializer/WssSecurityTest.php | 389 ++++++++++++++---- 14 files changed, 475 insertions(+), 177 deletions(-) create mode 100644 src/WssWsSecurity/Exception/ClientException.php rename src/WssWsSecurity/{ => Serializer}/AbstractWsSecurityFilter.php (89%) rename src/WssWsSecurity/{ => Serializer}/WsSecurityFilterRequest.php (91%) rename src/WssWsSecurity/{ => Serializer}/WsSecurityFilterResponse.php (89%) create mode 100644 src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php rename src/WssWsSecurity/{ => Serializer}/WssSecurityHeaderHandler.php (50%) create mode 100644 tests/Fixtures/client_private_key.pem create mode 100644 tests/Fixtures/client_public_key.pem delete mode 100644 tests/Fixtures/clientcert.pem delete mode 100644 tests/Fixtures/clientkey.pem create mode 100644 tests/Fixtures/server_private_key.pem create mode 100644 tests/Fixtures/server_public_key.pem delete mode 100644 tests/Fixtures/servercert.pem diff --git a/src/WssWsSecurity/Exception/ClientException.php b/src/WssWsSecurity/Exception/ClientException.php new file mode 100644 index 0000000..747653f --- /dev/null +++ b/src/WssWsSecurity/Exception/ClientException.php @@ -0,0 +1,9 @@ +serviceSecurityKey = $serviceSecurityKey; } @@ -46,7 +48,7 @@ public function setServiceSecurityKeyObject(SecurityKeyPair $serviceSecurityKey) * * @return void */ - public function setUserSecurityKeyObject(SecurityKeyPair $userSecurityKey) + public function setUserSecurityKeyObject(SecurityKeyPair $userSecurityKey = null) { $this->userSecurityKey = $userSecurityKey; } diff --git a/src/WssWsSecurity/WsSecurityFilterRequest.php b/src/WssWsSecurity/Serializer/WsSecurityFilterRequest.php similarity index 91% rename from src/WssWsSecurity/WsSecurityFilterRequest.php rename to src/WssWsSecurity/Serializer/WsSecurityFilterRequest.php index 8312dcd..00f3952 100644 --- a/src/WssWsSecurity/WsSecurityFilterRequest.php +++ b/src/WssWsSecurity/Serializer/WsSecurityFilterRequest.php @@ -1,9 +1,11 @@ createElementNS(self::NS_WSS, 'Security'); - + $dom = $currentNode->ownerDocument; $root = $dom->documentElement; - $root->setAttributeNS( - 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI - 'xmlns:wssu', - self::NS_WSU - ); - $root->setAttributeNS( - 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI - 'xmlns:wsss', - self::NS_WSS - ); - $root->setAttributeNS( - 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI - 'xmlns:dsig', - XmlSecurityDSig::NS_XMLDSIG - ); - $root->setAttributeNS( - 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI - 'xmlns:xenc', - XmlSecurityEnc::NS_XMLENC + + $namespaces = array( + 'ws' => self::NS_WSS, + 'wsu' => self::NS_WSU, + XmlSecurityDSig::PFX_XMLDSIG => XmlSecurityDSig::NS_XMLDSIG, + XmlSecurityEnc::PFX_XMLENC => XmlSecurityEnc::NS_XMLENC, ); + foreach ($namespaces as $prefix => $ns) { + $root->setAttributeNS( + 'http://www.w3.org/2000/xmlns/', // xmlns namespace URI + 'xmlns:'.$prefix, + $ns + ); + } + + $security = $dom->createElementNS(self::NS_WSS, $root->lookupPrefix(self::NS_WSS).':Security'); + $currentNode->parentNode->replaceChild($security, $currentNode); + // init timestamp $dt = $this->initialTimestamp ?: new \DateTime('now', new \DateTimeZone('UTC')); @@ -343,6 +347,7 @@ private function handleTimestamp(\DOMElement $security, \DateTime $dt) private function handleUsername(\DOMElement $security, $dt, Security $securityData) { $dom = $security->ownerDocument; + $usernameToken = $dom->createElementNS(self::NS_WSS, 'UsernameToken'); $security->appendChild($usernameToken); @@ -383,6 +388,12 @@ private function handleUsername(\DOMElement $security, $dt, Security $securityDa private function handleSignature(\DOMElement $security) { $dom = $security->ownerDocument; + + // this is fundamental for the signature + // formatting the dom adds nodes that are not signed + $dom->formatOutput = false; + $dom->preserveWhiteSpace = true; + $guid = 'CertId-' . self::generateUUID(); // add token references $keyInfo = null; @@ -390,6 +401,8 @@ private function handleSignature(\DOMElement $security) $keyInfo = $this->createKeyInfo($dom, $this->tokenReferenceSignature, $guid, $this->userSecurityKey->getPublicKey()); } $nodes = $this->createNodeListForSigning($dom, $security); + + $signature = XmlSecurityDSig::createSignature($this->userSecurityKey->getPrivateKey(), XmlSecurityDSig::EXC_C14N, $security, null, $keyInfo); if ((!$prefix = $security->lookupPrefix(self::NS_WSU)) && (!$prefix = $security->ownerDocument->lookupPrefix(self::NS_WSU))) { @@ -397,7 +410,7 @@ private function handleSignature(\DOMElement $security) } $options = array( - 'id_ns_prefix' => $prefix ?: 'wsu', + 'id_ns_prefix' => $prefix, 'id_prefix_ns' => self::NS_WSU, ); foreach ($nodes as $node) { @@ -414,7 +427,6 @@ private function handleSignature(\DOMElement $security) $binarySecurityToken->setAttributeNs(self::NS_WSU, $prefix.':Id', $guid); - return $signature; } diff --git a/src/WssWsSecurity/WsSecurityFilterResponse.php b/src/WssWsSecurity/Serializer/WsSecurityFilterResponse.php similarity index 89% rename from src/WssWsSecurity/WsSecurityFilterResponse.php rename to src/WssWsSecurity/Serializer/WsSecurityFilterResponse.php index 82f7d9e..61992bc 100644 --- a/src/WssWsSecurity/WsSecurityFilterResponse.php +++ b/src/WssWsSecurity/Serializer/WsSecurityFilterResponse.php @@ -1,13 +1,14 @@ childNodes as $key) { if (self::NS_WSS === $key->namespaceURI) { @@ -68,6 +69,7 @@ protected function keyInfoSecurityTokenReferenceResolver(\DOMElement $node, $alg return null; } + /** * Modify the given request XML. * @@ -77,7 +79,6 @@ protected function keyInfoSecurityTokenReferenceResolver(\DOMElement $node, $alg */ public function filterDom(\DOMDocument $dom) { - // locate security header $security = $dom->getElementsByTagNameNS(self::NS_WSS, 'Security')->item(0); if (null !== $security) { @@ -87,9 +88,12 @@ public function filterDom(\DOMDocument $dom) // do we have a reference list in header $referenceList = XmlSecurityEnc::locateReferenceList($security); // get a list of encrypted nodes + $encryptedNodes = XmlSecurityEnc::locateEncryptedData($dom, $referenceList); + // decrypt them if (null !== $encryptedNodes) { + foreach ($encryptedNodes as $encryptedNode) { XmlSecurityEnc::decryptNode($encryptedNode); } @@ -100,14 +104,14 @@ public function filterDom(\DOMDocument $dom) // verify references $options = array( 'id_ns_prefix' => 'wsu', // used only for the xpath prefix - 'id_prefix_ns' => self::PFX_WSU + 'id_prefix_ns' => self::NS_WSU ); if (XmlSecurityDSig::verifyReferences($signature, $options) !== true) { - throw new \SoapFault('wsse:FailedCheck', 'The signature or decryption was invalid'); + throw new ClientException('The node signature or decryption was invalid'); } // verify signature if (XmlSecurityDSig::verifyDocumentSignature($signature) !== true) { - throw new \SoapFault('wsse:FailedCheck', 'The signature or decryption was invalid'); + throw new ClientException('The document signature or decryption was invalid'); } } diff --git a/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php b/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php new file mode 100644 index 0000000..3b6b350 --- /dev/null +++ b/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php @@ -0,0 +1,48 @@ + 'serializer.pre_deserialize', + 'method' => 'onPreDeserializeEvent', + 'class' => HeaderPlaceholder::class, + 'format' => 'xml' + ), + array( + 'event' => 'serializer.pre_deserialize', + 'method' => 'onPreDeserializeEvent', + 'class' => 'Ex\SoapEnvelope12\Messages\RequestHeaderInput', + 'format' => 'xml' + ), + ); + } + + public function __construct(WsSecurityFilterResponse $filter) + { + $this->filter = $filter; + } + + public function onPreDeserializeEvent(PreDeserializeEvent $event) + { + $data = $event->getData(); + + $envelope = dom_import_simplexml($data); + $this->filter->filterDom($envelope->ownerDocument); + + $newData = simplexml_import_dom($envelope); + $event->setData($newData); + } +} diff --git a/src/WssWsSecurity/WssSecurityHeaderHandler.php b/src/WssWsSecurity/Serializer/WssSecurityHeaderHandler.php similarity index 50% rename from src/WssWsSecurity/WssSecurityHeaderHandler.php rename to src/WssWsSecurity/Serializer/WssSecurityHeaderHandler.php index e73cf29..a52c60f 100644 --- a/src/WssWsSecurity/WssSecurityHeaderHandler.php +++ b/src/WssWsSecurity/Serializer/WssSecurityHeaderHandler.php @@ -1,17 +1,10 @@ 'xml', 'type' => Security::class, 'method' => 'serializeHeader' - ) + ), ); } - public function __construct(WsSecurityFilterRequest $filterResponse) + public function __construct(WsSecurityFilterRequest $filter) { - $this->filter = $filterResponse; + $this->filter = $filter; } public function serializeHeader(XmlSerializationVisitor $visitor, Security $data, array $type, SerializationContext $context) { - - $securityHeader = $this->filter->filterDom($visitor->getDocument(), $data); - $currentNode = $visitor->getCurrentNode(); - $currentNode->parentNode->replaceChild($securityHeader, $currentNode); + $securityHeader = $this->filter->filterDom($currentNode, $data); $visitor->revertCurrentNode(); $visitor->setCurrentNode($securityHeader); } diff --git a/tests/Fixtures/client_private_key.pem b/tests/Fixtures/client_private_key.pem new file mode 100644 index 0000000..ac19d1f --- /dev/null +++ b/tests/Fixtures/client_private_key.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMsT5SynGYPCrpIP +1LkVZvEZwI9YoUQOHmnj4AN0SklWsZTOwBsJGJoi9MKm+QNAuLMFeYezn7a7nyEK +7Awls7yvig7xRn2yj5KskroAdyTvwB6s8yx+1BfkwOCZCOpOiYBNxpsRezjafYD8 +2SgwPywL3OYjgRUBraAbUPXt1KfrAgMBAAECgYABCb3/J2+C8+jOiFQvCgP3sYkB +cpOIdIYFRovrmJmUnGPV/eSPftFoYEtd/1qAgMEw8RM49VsYpQbgNV0Vhs/PYcQB +Jlpo/Lhv58/BiOVYei2bi3lQsIM2Y+LppF06JqcbpGn7neWILfYQiMKF4Zjxrj2F +v3JWJfTE2RzRUqQx+QJBAPU6MXbf+4eUl4VJkFAWG2qleDZsGNfutBxzKMLv2HWn +ciTLo+VXMfSxVNVECH8sjbwWYEAY0MiJZk1ZpVtk900CQQDT/7Dh5qFmQxmH1L40 +rGfgvaHQzsjk3pYkia84A0dudthExvpSPGwoGDY5HWwEgHKczWjfhZ1olXlSbKpk +9DAXAkEApVrDBdRMSATDEuYiwE3X2NaQs6m6KshTfKeOQbv2qobpKbSC5F8iWUvF +1zRTwmUpgT1ZU38oMUCs0dVz8aeoNQJBAKISrXDWt/eNPtx4SX3NfJD1iNsw66cF +gHWoiTtiTl7mHsrd8Aukw+8XK4UYuDbs2DKGWzHfXYrSE3FvQAl0IbsCQQDPj/Ua +KvpKA+HNpaHUyPrVG2d/tBJgcvh7Q3EF+2LuBxS1gW/4VulhNwhbbm8Wi1xz3mCC +rmejXgOSRBlBAjDW +-----END PRIVATE KEY----- diff --git a/tests/Fixtures/client_public_key.pem b/tests/Fixtures/client_public_key.pem new file mode 100644 index 0000000..bdc043c --- /dev/null +++ b/tests/Fixtures/client_public_key.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLE+UspxmDwq6SD9S5FWbxGcCP +WKFEDh5p4+ADdEpJVrGUzsAbCRiaIvTCpvkDQLizBXmHs5+2u58hCuwMJbO8r4oO +8UZ9so+SrJK6AHck78AerPMsftQX5MDgmQjqTomATcabEXs42n2A/NkoMD8sC9zm +I4EVAa2gG1D17dSn6wIDAQAB +-----END PUBLIC KEY----- diff --git a/tests/Fixtures/clientcert.pem b/tests/Fixtures/clientcert.pem deleted file mode 100644 index f433d48..0000000 --- a/tests/Fixtures/clientcert.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICoDCCAgkCBEnhw2IwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMw -EQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEq -MCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYD -VQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEy -MTAzMzA2WhcNMzYwODI3MTAzMzA2WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgT -CldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQK -EyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vu -a25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEF -AAOBjQAwgYkCgYEAhOVyNK8xyxtb4DnKtU6mF9KoiFqCk7eKoLE26+9h410CtTkx -zWAfgnR+8i+LPbdsPY+yXAo6NYpCCKolXfDLe+AG2GwnMZGrIl6+BLF3hqTmIXBF -TLGUmC7A7uBTivaWgdH1w3hb33rASoVU67BVtQ3QQi99juZX4vU9o9pScocCAwEA -ATANBgkqhkiG9w0BAQUFAAOBgQBMNPo1KAGbz8Jl6HGbtAcetieSJ3bEAXmv1tcj -ysBS67AXzdu1Ac+onHh2EpzBM7kuGbw+trU+AhulooPpewIQRApXP1F0KHRDcbqW -jwvknS6HnomN9572giLGKn2601bHiRUj35hiA8aLmMUBppIRPFFAoQ0QUBCPx+m8 -/0n33w== ------END CERTIFICATE----- diff --git a/tests/Fixtures/clientkey.pem b/tests/Fixtures/clientkey.pem deleted file mode 100644 index a47f923..0000000 --- a/tests/Fixtures/clientkey.pem +++ /dev/null @@ -1,14 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAITlcjSvMcsbW+A5yrVOphfSqIha -gpO3iqCxNuvvYeNdArU5Mc1gH4J0fvIviz23bD2PslwKOjWKQgiqJV3wy3vgBthsJzGRqyJevgSx -d4ak5iFwRUyxlJguwO7gU4r2loHR9cN4W996wEqFVOuwVbUN0EIvfY7mV+L1PaPaUnKHAgMBAAEC -gYAZ6UqtLwN8YGc3fs0hMKZ9upsViuAuwPiMgED/G3twgzAF+ZLWQkmie+hMfCyf6eV200+pVm0n -Bz/8xH/oowxpX0Kk3szoB4vFghjU84GKUcrbhu/NRIm7l3drnfbzqhQkHDCx6n1CotI4Gs49cDWu -4uEAuxJkEIVY553unZjZgQJBAOJVIallNKmD0iQlvtWRmRzpmYDjt9vhNY6WBTIOx6SDn9SRaoSA -fkipQ2HXo04r78TQ674+zfZ1lRTkFG7px6ECQQCWUPHp3pSZOM1oGzJrNvNaw+MizZAZjq34npHm -9GRquFLG7BlCaI9QNGE7pN2ryYsYCRUMaM2e4GR0tUXxVGknAkAgrxqFU9AfCqI2Bh1gyf3KZxF7 -w2axofwR8ygc6nV6FGfoUneHWubhp0/LuVAj4cRmL6Vbe8ZSaPh2Y9lviuMBAkEAicP8Q+1E4j1m -PPEYP51oYprANOiUFmhnWEL00+jPk+QFsd03tV6hYs/vAbwzkjuwqMHCMdJoCiH8z95IEUvc5wJA -MvLOuZdu4dmhOXg/YKsbMSPjFNEVskLQNSXqw6O2wIrpPg1NQvBBAOTbiuZj3vind4VPos1wc4vB -QocvdUC6dA== ------END PRIVATE KEY----- diff --git a/tests/Fixtures/server_private_key.pem b/tests/Fixtures/server_private_key.pem new file mode 100644 index 0000000..ee0af3c --- /dev/null +++ b/tests/Fixtures/server_private_key.pem @@ -0,0 +1,16 @@ +-----BEGIN PRIVATE KEY----- +MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMOlvDM/vmkXG4m7 +TdXdY4f6yS4FsXEDRPfxuX2eM3wl1pNd6ZYVmCvby3xf1SXyV+b+RaY5IYHmT9rn +zXkJMQHTH5Kk2kxmUic9oDvYJak3FygW4bejnVsZ+U3z8S1LEyMuBEOvqgUJ11aA +3GPXVZI66so37mOEhW0/I50uHnddAgMBAAECgYEAhozhjGFHQyDIKIWu9ujFfYvk +dYkmyfEUqmwMRC7be4LOOhT5AuWg/HCxVbzWar1q5Ip0PefGen545rRKI/ZFQ6U+ +Fp0dH/4KIjVJP3YWSXB4GcJ/BtBj5op1o0T6rthIkvBLZULtu991+dbmnsOgsJ/x +Cgm68Eu8NngQ+mucqsECQQD6PrIRoVy6T5mYfID9V/aE4GEbDKPEKx7eaWa6prUj +BLXiATTR1txlV7VjiBzIQ+o/abtn+MQ9culIEbXwM5zxAkEAyCWZeP0Bt1LcQjFR +Vjfo4Nwyu/Z32Tpz/wNZakwuFbDWZ5vbN5LKDbs+gYyFqV97Kgqr10Z8tiEJs/4+ +Bx3xLQJACK3d/TCMh8W0/Q3sZ10Cps8lbwu8LlSUiIA9WOHpTGKgcEs8ar65/CXT +m7Uf0m5QlIx1PIDrRXpTzvUWS1Nu8QJBAKxC4EKnz9BO+s/lzpGccU0HeIsaaLCI +hMmZwl2gz5FPsFlgZV8BcfI7lGK/5VKPoVvf72LLgg7nhIhsbEqH1MkCQFcRuk/k +VHZQYJ2lxcqT4Q8BJiXppoplJjxM1xWnjYHGwDh6+T/yGgWIgbtWg3lv9q8z3sHH +qnNxabaU4Dz9wt4= +-----END PRIVATE KEY----- diff --git a/tests/Fixtures/server_public_key.pem b/tests/Fixtures/server_public_key.pem new file mode 100644 index 0000000..c87dbb0 --- /dev/null +++ b/tests/Fixtures/server_public_key.pem @@ -0,0 +1,6 @@ +-----BEGIN PUBLIC KEY----- +MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDDpbwzP75pFxuJu03V3WOH+sku +BbFxA0T38bl9njN8JdaTXemWFZgr28t8X9Ul8lfm/kWmOSGB5k/a5815CTEB0x+S +pNpMZlInPaA72CWpNxcoFuG3o51bGflN8/EtSxMjLgRDr6oFCddWgNxj11WSOurK +N+5jhIVtPyOdLh53XQIDAQAB +-----END PUBLIC KEY----- diff --git a/tests/Fixtures/servercert.pem b/tests/Fixtures/servercert.pem deleted file mode 100644 index 040b22c..0000000 --- a/tests/Fixtures/servercert.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICoDCCAgkCBEnhwzMwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMw -EQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEq -MCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYD -VQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEy -MTAzMjE5WhcNMzYwODI3MTAzMjE5WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgT -CldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQK -EyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vu -a25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEF -AAOBjQAwgYkCgYEA1H3mjQCF9uce2jmm/Yq9kE4ytfvkp4c8G90cDfJXJvOiGQds -p2vDZXKuCkHQ7vsBBXPNTt8J/d8ZbEwyuB9Ccz5pJqi6Ig6Y2/mEsPthDyh5SrJV -yQ/wxUGwmfSuwdrIMnplMTq+OR9BOfT3CvjSvuy9d6BQNo4wOMkDvmZTtI8CAwEA -ATANBgkqhkiG9w0BAQUFAAOBgQCqv4475QaqlKcN2QCZJbLVKZEX+76XLQurGkgf -2fCgesRHjfUfOHyTTlhWQdEKTcBB2XviUyyW6I//fmKfXUIiQqvgh4LHdXRPEXDf -Y9nr89MjyQpDlnl6AlrvSej30a9iwVRUeVk4d6gxWHMRonKBFgh+TGexxUXHtPkf -B1Pdtg== ------END CERTIFICATE----- diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index e7bb2db..fedc273 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -7,15 +7,16 @@ use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\Handler\HeaderHandler; use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\Handler\HeaderPlaceholder; use GoetasWebservices\SoapServices\SoapClient\Arguments\Headers\MustUnderstandHeader; -use GoetasWebservices\SoapServices\SoapClient\Envelope\Handler\FaultHandler; use GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12\Messages\Fault as Fault12; use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Security; use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\SecurityKeyPair; -use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WsSecurityFilterRequest; -use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WssSecurityHeaderEventHandler; -use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\WssSecurityHeaderHandler; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Serializer\WsSecurityFilterRequest; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Serializer\WsSecurityFilterResponse; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Serializer\WssSecurityHeaderEventHandler; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Serializer\WssSecurityHeaderEventListener; +use GoetasWebservices\SoapServices\SoapClient\WssWsSecurity\Serializer\WssSecurityHeaderHandler; use GoetasWebservices\WsdlToPhp\Tests\Generator; -use JMS\Serializer\EventDispatcher\EventDispatcher; +use JMS\Serializer\EventDispatcher\EventDispatcherInterface; use JMS\Serializer\Handler\HandlerRegistryInterface; use JMS\Serializer\Serializer; @@ -26,11 +27,25 @@ class WssSecurityTest extends \PHPUnit_Framework_TestCase */ protected $serializer; + /** + * @var WsSecurityFilterRequest + */ + protected $requestFilter; + + + /** + * @var WsSecurityFilterResponse + */ + protected $responseFilter; + /** * @var HeaderHandler */ protected $headerHandler; + /** + * @var Generator + */ protected static $generator; protected static $namespaces = [ 'http://www.example.org/test/' => "Ex", @@ -59,32 +74,39 @@ public function setUp() $generator = self::$generator; $ref = new \ReflectionClass(Fault12::class); - $this->headerHandler = new HeaderHandler(); - $this->serializer = $generator->buildSerializer(function (HandlerRegistryInterface $h) { - $h->registerSubscribingHandler($this->headerHandler); - $hr = new WsSecurityFilterRequest(); + $this->requestFilter = new WsSecurityFilterRequest(); + $this->responseFilter = new WsSecurityFilterResponse(); + + $keypair1 = new SecurityKeyPair(); + $keypair1->setPrivateKey(\ass\XmlSecurity\Key::RSA_SHA1, __DIR__.'/../Fixtures/client_private_key.pem'); + $keypair1->setPublicKey(\ass\XmlSecurity\Key::RSA_SHA1, __DIR__.'/../Fixtures/client_public_key.pem'); + + $this->requestFilter->setUserSecurityKeyObject($keypair1); - $keypair = new SecurityKeyPair(); - $filename = __DIR__.'/../Fixtures/clientkey.pem'; - $keypair->setPrivateKey(\ass\XmlSecurity\Key::RSA_SHA1, $filename); - $filename = __DIR__.'/../Fixtures/clientcert.pem'; - $keypair->setPublicKey(\ass\XmlSecurity\Key::RSA_SHA1, $filename); + $keypair2 = new SecurityKeyPair(); + $keypair2->setPrivateKey(\ass\XmlSecurity\Key::TRIPLEDES_CBC); + $keypair2->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/server_public_key.pem'); - $hr->setUserSecurityKeyObject($keypair); + $this->requestFilter->setServiceSecurityKeyObject($keypair2); + $keypair3 = new SecurityKeyPair(); + $keypair3->setPrivateKey(\ass\XmlSecurity\Key::RSA_SHA1, __DIR__.'/../Fixtures/server_private_key.pem'); + $keypair3->setPublicKey(\ass\XmlSecurity\Key::RSA_SHA1, __DIR__.'/../Fixtures/client_public_key.pem'); - $keypair = new SecurityKeyPair(); - $keypair->setPrivateKey(\ass\XmlSecurity\Key::TRIPLEDES_CBC); - $keypair->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/servercert.pem'); - $hr->setServiceSecurityKeyObject($keypair); + $this->responseFilter->setUserSecurityKeyObject($keypair3); + $this->headerHandler = new HeaderHandler(); + $this->serializer = $generator->buildSerializer(function (HandlerRegistryInterface $h) { + $h->registerSubscribingHandler($this->headerHandler); - $sechandler = new WssSecurityHeaderHandler($hr); + $sechandler = new WssSecurityHeaderHandler($this->requestFilter); $h->registerSubscribingHandler($sechandler); }, [ 'GoetasWebservices\SoapServices\SoapClient\Envelope\SoapEnvelope12' => dirname($ref->getFileName()) . '/../../../Resources/metadata/jms12', - ]); + ], function(EventDispatcherInterface $d) { + $d->addSubscriber(new WssSecurityHeaderEventListener($this->responseFilter)); + }); } @@ -92,6 +114,7 @@ public function testSerializeSecurity() { $headerPlaceholder = new HeaderPlaceholder(); + $this->requestFilter->setSecurityOptionsEncryption(WsSecurityFilterRequest::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER); $security = new Security(); $security->setUsername('foo'); @@ -115,85 +138,299 @@ public function testSerializeSecurity() $xml = $this->serializer->serialize($env, 'xml'); $expectedString = ' - - - + + + - - - - - + + + + + - wZt0/BXw53bz2Ni1WI1U4UhzPP8jlVPW7K29/wDZDm9/j/KA4D7e2GaAH4GPHSYZ2foadJKSWPaqJP+RsATV8LpGSeLLCoFjx2aYI371xFQu1/SJRuaRKpW8YKYarISSEWcPpVcAjgGBz8rRqoXCd6CZ8XmTTt4AIvXdiQfqsKyBoFYyGsItdoA3qWqXix1/Or1K/MHMd22NC6wJRdLksV+m/ulzbm+NdKvVomGCOxAaGtvk+buCLLskqXo+mQd4Ox2c8Qabh3MPz8tdmabq1JI7pmgx0HVaZS2VJTvimcwCJ1v90AJFz/78ue61FI74DSGCoYGOHnAttWQTcZxJpCqVLbPFjLm7i2an+OAVhD5cdObxi/NsPAzVMIM+fWaN0+r7xCeNplukj5Q40UH7V8jLKAn3PwEgIs2ld+Dn6BYbfkxqvIhEQwjyfm9pwWsEs1H4EY0YqAWtR91Ioxr/ZU1ojjtrBXc56VRB327gLKPnecDEQaycAVKK4EnnbOAldfkbS99MxrwBkADSsVgfQEar5ZhWuA7nD+HphvRjDJmpO1NuWeMBLOL7SuFMZBn5uRvO4G8plkC9x2gOVCRRRMTLHUUB2CLTS7h6ETHrwOI= + aPfDzwzxuVaqRXvKfnBIKxqyPgdyZvBLm0JyNXRyZDn7HNHoX7cuAtT5tHne9lQP4/9DRXyhA/1HdxY755dv8IS9PMcNpGGEdhwy2UgTko0zDynpwUcvrslxukFehskvhhyFAxIShmbFJzRZjbq/OYeggiXWhcg+/tezDuyNbHSdnWcSq8w9+oO5UTog4Uj47DWY+2r6iP1/Ln7boMi8wn2xABIxkBFFU32z51tngtMIzvWyoFFDf9xc3jDgz5Vd9t4jUbm9akH68m2TAngGahGOEzIa3JudVLEkDLJXT8UCZkuHmP85r2QGEMz/8cMJOE8cjDKtAlbMy1lL7kbzSFA2yYZBEkyXM+F1y1E/A7YS+/mrQ2VqdDldEQNtfSiaV/VPEonrGJkFrSWlYeEUWF2Cg8rEerDrmYZX3vLyVxrtjNHSA5JVaQOpwWO0BGajIuEiCgoHRbA1zPmtpoZh9u39Hd/F8bg9ZBDCOky1L83f0IW5LHUjYOv0FxqFXftdKvnF7/aDbiZnhX3330p/Iw2guOWpwJTHyOilfMXo0sC3jY/hB36jIznYb+TtAMKB3lki47jVj2DREYQDh/nsH1HhbpgFe+JhtFvV3ewZGjc= - - - 2016-12-20T18:12:12.000Z - 2016-12-20T18:17:12.000Z - - - foo - - MIICoDCCAgkCBEnhw2IwDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNVBAYTAk5aMRMwEQYDVQQIEwpXZWxsaW5ndG9uMRowGAYDVQQHExFQYXJhcGFyYXVtdSBCZWFjaDEqMCgGA1UEChMhU29zbm9za2kgU29mdHdhcmUgQXNzb2NpYXRlcyBMdGQuMRAwDgYDVQQLEwdVbmtub3duMRgwFgYDVQQDEw9EZW5uaXMgU29zbm9za2kwHhcNMDkwNDEyMTAzMzA2WhcNMzYwODI3MTAzMzA2WjCBljELMAkGA1UEBhMCTloxEzARBgNVBAgTCldlbGxpbmd0b24xGjAYBgNVBAcTEVBhcmFwYXJhdW11IEJlYWNoMSowKAYDVQQKEyFTb3Nub3NraSBTb2Z0d2FyZSBBc3NvY2lhdGVzIEx0ZC4xEDAOBgNVBAsTB1Vua25vd24xGDAWBgNVBAMTD0Rlbm5pcyBTb3Nub3NraTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAhOVyNK8xyxtb4DnKtU6mF9KoiFqCk7eKoLE26+9h410CtTkxzWAfgnR+8i+LPbdsPY+yXAo6NYpCCKolXfDLe+AG2GwnMZGrIl6+BLF3hqTmIXBFTLGUmC7A7uBTivaWgdH1w3hb33rASoVU67BVtQ3QQi99juZX4vU9o9pScocCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBMNPo1KAGbz8Jl6HGbtAcetieSJ3bEAXmv1tcjysBS67AXzdu1Ac+onHh2EpzBM7kuGbw+trU+AhulooPpewIQRApXP1F0KHRDcbqWjwvknS6HnomN9572giLGKn2601bHiRUj35hiA8aLmMUBppIRPFFAoQ0QUBCPx+m8/0n33w== - + + + 2016-12-21T14:04:53.000Z + 2016-12-21T14:09:53.000Z + + + foo + + + + + + + + - e4q/136uZJjLsvgqBz93BLgtHHgg7CBkJ8XdezFfsu2nBLtm5Z27499rUJafreJ8FNZC2VxZAb7aaTWX1gOU/eAEq4KA2pmw0ZlsEZo+wubzc0ncPrQYRadKYiFFGt543Wx3LLd+A68T38JUbUNv0DjSEiVC3+FHvVuaOOttydE= + og8QzG1KkeF3W302te9V5leP4Mnvrb+qJEld055MFCYUFN6znwR0dbp/P3YRqV0efBIkF6MA5Gj4TX6TkyIvHjELTJNyQDpfrLWXZBhzP+6AdrCQzpWZ0p3sYUJXDVoYXEKhfPYmdpReMoK/H4cmcfdZj2B/ZcMmL/ZCQNxOAv4= - + - - - - - - - - - - Gh5gQXLbHDOZm/x5mpOrhOid3zE= - - - - - - - 2jmj7l5rSw0yVb/vlWAYkK/YBwk= - - - - - - - 2jmj7l5rSw0yVb/vlWAYkK/YBwk= - - - cslBnIZq7zBc7F0ZQa1zXrhsTA6S6mcpDLIdpPZgWCsN4VqmWQrgJCCkcoxoUSTqYeeJfHdnGiG3//hPFidEIMkWQKzgxzMIzskTXNuA6dPcQ58w6euAVgWrwhetcXzGtk/iVNHSaoHGEsGJjubt1d7PbuTo7j/Ov4VXWilKCSw= - - + + + + + + + + + + ji4+Hoi++5jtopiElK3EFL/AcTM= + + + + + + + H4BPAIlGlXwRxZcXxgJTgBMxQ5Y= + + + + + + + Unz40wju5ExcAkTC5PMMJaRxZV8= + + + kRjlhN3nNNHciRBaD89V89NDZyiKrHV1WcgmQ7mdKyBgXeRMhitnYIt0YsPqwA0DA86doFNiMqfkI4OqcCltUL4VQt3MiMn+6st5R/tQgGoExZ/VE5QqzWjZiJEk8nLcDmqVmOFS8HSsp3cct2rj4PhxBo1IxSo2ZJo0psBg3G4= + + -'; + +'; + + $this->assertXmlStringEqualsXmlString($this->cleanXML($expectedString), $this->cleanXML($xml)); + } + + public function testDeSerializeSecurity() + { + + $headerPlaceholder = new HeaderPlaceholder(); + + $this->requestFilter->setSecurityOptionsEncryption(WsSecurityFilterRequest::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER); + $this->requestFilter->setSecurityOptionsSignature(WsSecurityFilterRequest::TOKEN_REFERENCE_SUBJECT_KEY_IDENTIFIER); + + $keypair1 = new SecurityKeyPair(); + $keypair1->setPrivateKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/client_private_key.pem'); + $keypair1->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/client_public_key.pem'); + + $keypair2 = new SecurityKeyPair(); + $keypair2->setPrivateKey(\ass\XmlSecurity\Key::TRIPLEDES_CBC, str_repeat("1", 24)); + $keypair2->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/server_public_key.pem'); + + $keypair3 = new SecurityKeyPair(); + $keypair3->setPrivateKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/server_private_key.pem'); + + $keypair4 = new SecurityKeyPair(); + $keypair4->setPublicKey(\ass\XmlSecurity\Key::RSA_1_5, __DIR__.'/../Fixtures/client_public_key.pem', true); + + $this->requestFilter->setUserSecurityKeyObject($keypair1); + $this->requestFilter->setServiceSecurityKeyObject($keypair2); + + $this->responseFilter->setServiceSecurityKeyObject($keypair4); + $this->responseFilter->setUserSecurityKeyObject($keypair3); + + $security = new Security(); + $security->setUsername('foo'); + + $this->headerHandler->addHeaderData($headerPlaceholder, new MustUnderstandHeader($security)); + + + $env = new RequestHeaderInput(); + $env->setHeader($headerPlaceholder); + + $body = new \Ex\SoapParts\RequestHeaderInput(); + $p = new \Ex\RequestHeader(); + $p->setIn("sss"); + $body->setParameters($p); + $env->setBody($body); + + $xmlString = $this->serializer->serialize($env, 'xml'); + + /** + * @var $object RequestHeaderInput + */ + $object = $this->serializer->deserialize($xmlString, RequestHeaderInput::class, 'xml'); + + $this->assertEquals("sss", $object->getBody()->getParameters()->getIn()); + $this->assertInstanceOf('Ex\RequestHeader', $object->getBody()->getParameters()); + } + + public function testSerializeSecurityWithTokenTypes() + { + $headerPlaceholder = new HeaderPlaceholder(); + + $this->requestFilter->setSecurityOptionsEncryption(WsSecurityFilterRequest::TOKEN_REFERENCE_SECURITY_TOKEN); + $this->requestFilter->setSecurityOptionsSignature(WsSecurityFilterRequest::TOKEN_REFERENCE_SECURITY_TOKEN); + + $security = new Security(); + $security->setUsername('foo'); + $security->setPassword('pass'); + + $this->headerHandler->addHeaderData($headerPlaceholder, new MustUnderstandHeader($security)); + + $env = new RequestHeaderInput(); + $env->setHeader($headerPlaceholder); + + $body = new \Ex\SoapParts\RequestHeaderInput(); + $p = new \Ex\RequestHeader(); + $p->setIn("sss"); + $body->setParameters($p); + $env->setBody($body); + + $xml = $this->serializer->serialize($env, 'xml'); + + $expectedString = ' + + + + + + + + + + + RuqNIV9tlKbV/XBoB0vxN5DjvCuVtJArIgSKcOQ8LoS7CEuD3mbmHsbDwAf3nEWQ7zRrQTw2C3XC+J5xNrMpyaAmiJuSea4TdhhSJ0uMFgtKY9OpSVEAEvFklx7kaOJTxTg+M1DMopAljldbRFVlghmTR0g2PIPaXhJfawO6HbjIeAJ8BfYblDnzoHv6CzpbaRJCKcbi1PjlLSaub1kQtjdONWv5VfLh1jB7M+EgWKGVbjLG6Xq1cColAo24NaD1TI+deaNKT4/Rw3w3zJKnxbEIQ01xgCtiB6AfR6G9851FXqR0OdcqHhVe0vfnjT+NGDEwazgLX6XcnwFDkge7zJ/vqKHWC1Jyjl2ym/P3JTSjje/ozFPNnQjlMVSAK0c5wA57+HsA3OCo9fHWtQoaRw7cboMOg0Qg6IoUi2+g0OhWgC0EKVnUqQzFGqDEXD9S3gIsv7Q+jCpwFEcKvkYe287VgeKmePOqbBLuA5LcMRYDMoOGtY0CUpe0A1klC2cGIYn2EMpGcTK4+ckUp5Hz02JgK6VnaI54f8EaVIV2hhrnnJSes+3/94v3erytbY6pROvM6TzFUDc5dOD+ZU07MfIPZAhV0h0dXmpObiyctpw= + + + + + + + 2016-12-21T14:00:49.000Z + 2016-12-21T14:05:49.000Z + + + foo + + + + + + + + + + + lWbYQaXg8hhPxjyMlBMCt0dsxt3NWFZWIlNL3lq6s1qsvQ+UN8Gn1jJYivPkLTtiGKatTtwQijS8iBcOmyp73/27EkGwLqovbhnkz+ZmWdyIcFtdD2qpcb2HD10cppo0a8QPmwEtXIYPM5GlH8kLXm4u9kn9OJA5FreCFASCwT0= + + + + + + + + + + + + + + + RHWAhMuWzw2uUF5cBc6ObCBpC9I= + + + + + + + CaIRD27prYA1YCyY4fUV5L9rj7Y= + + + + + + + Mbbxwz6mcQhxMbiw8RIKHqyXeHs= + + + F8aOS40ypNHMHnsWDbkWb27NAEezKV7RmodKFuXjmkRB70YKoGUMIZSyvIlaj/E6GQ7a27gQyv6Kjzb8XTemQw+I8kgMGXiECVplbhuH3OayOKvMXPo8g4y0+7P5uf7h0OhFoq9U2Pbya3HDqsxVm5AUdl5AAm9SZkNLoC43tuc= + + + + + + + + + +'; + + $this->assertXmlStringEqualsXmlString($this->cleanXML($expectedString), $this->cleanXML($xml)); + } + + public function testSerializeSecurityWithNoCerts() + { + $headerPlaceholder = new HeaderPlaceholder(); + + $this->requestFilter->setServiceSecurityKeyObject(null); + $this->requestFilter->setUserSecurityKeyObject(null); + + $security = new Security(); + $security->setUsername('foo'); + $security->setPassword('pass'); + + $this->headerHandler->addHeaderData($headerPlaceholder, new MustUnderstandHeader($security)); + + $env = new RequestHeaderInput(); + $env->setHeader($headerPlaceholder); + + $body = new \Ex\SoapParts\RequestHeaderInput(); + $p = new \Ex\RequestHeader(); + $p->setIn("sss"); + $body->setParameters($p); + $env->setBody($body); + + $xml = $this->serializer->serialize($env, 'xml'); + + $expectedString = ' + + + + + + + + + + 2016-12-21T09:51:41.000Z + 2016-12-21T09:56:41.000Z + + + foo + E+rwHP8u/HO0gP/9gHweD4hm/Lk= + MTg3NzQxNjUzMw== + 2016-12-21T09:51:41.000Z + + + + '; $this->assertXmlStringEqualsXmlString($this->cleanXML($expectedString), $this->cleanXML($xml)); } public function cleanXML($xml) { - $xml = preg_replace('~(Id|EncKey|Cert|\#)[a-f0-9\-]+~', '', $xml); - $xml = preg_replace('~\d{4}\-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*Z~', '', $xml); + $xml = preg_replace('~(Id|EncKey|Cert|\#)[a-f0-9\-]+~', 'X', $xml); + $xml = preg_replace('~\d{4}\-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*?Z~', 'X', $xml); - $tags = ['dsig:SignatureValue', 'dsig:DigestValue', 'xenc:CipherValue']; + $tags = ['ds:SignatureValue', 'ds:DigestValue', 'xenc:CipherValue', 'ws:BinarySecurityToken', 'ws:Nonce', 'ws:Password']; foreach ($tags as $tag) { - $xml = preg_replace("~<$tag>.*?<\\/$tag>~", '', $xml); + $xml = preg_replace("~(<$tag.*?>)(.*?)(<\\/$tag>)~", '\1abc\3', $xml); } return $xml; } From 84f501f7b4375d010723d6d260de025cf1378365 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Wed, 21 Dec 2016 15:26:15 +0100 Subject: [PATCH 15/17] test cleanup method --- tests/Serializer/WssSecurityTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index fedc273..97f964c 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -423,7 +423,7 @@ public function testSerializeSecurityWithNoCerts() $this->assertXmlStringEqualsXmlString($this->cleanXML($expectedString), $this->cleanXML($xml)); } - public function cleanXML($xml) + private function cleanXML($xml) { $xml = preg_replace('~(Id|EncKey|Cert|\#)[a-f0-9\-]+~', 'X', $xml); $xml = preg_replace('~\d{4}\-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*?Z~', 'X', $xml); From 4109dc4167477d73aa3a7a8c3a5a239b36900995 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Wed, 21 Dec 2016 15:31:49 +0100 Subject: [PATCH 16/17] fixed bin sec token --- tests/Serializer/WssSecurityTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Serializer/WssSecurityTest.php b/tests/Serializer/WssSecurityTest.php index 97f964c..7f224b2 100644 --- a/tests/Serializer/WssSecurityTest.php +++ b/tests/Serializer/WssSecurityTest.php @@ -430,7 +430,7 @@ private function cleanXML($xml) $tags = ['ds:SignatureValue', 'ds:DigestValue', 'xenc:CipherValue', 'ws:BinarySecurityToken', 'ws:Nonce', 'ws:Password']; foreach ($tags as $tag) { - $xml = preg_replace("~(<$tag.*?>)(.*?)(<\\/$tag>)~", '\1abc\3', $xml); + $xml = preg_replace("~(<$tag.*?>)(.+?)(<\\/$tag>)~", '\1abc\3', $xml); } return $xml; } From 299d8415f9220ca2edb0477e895eb7044387a877 Mon Sep 17 00:00:00 2001 From: Asmir Mustafic Date: Wed, 21 Dec 2016 15:38:21 +0100 Subject: [PATCH 17/17] test --- src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php b/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php index 3b6b350..0eceadc 100644 --- a/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php +++ b/src/WssWsSecurity/Serializer/WssSecurityHeaderEventListener.php @@ -41,7 +41,7 @@ public function onPreDeserializeEvent(PreDeserializeEvent $event) $envelope = dom_import_simplexml($data); $this->filter->filterDom($envelope->ownerDocument); - +echo $envelope->ownerDocument->saveXML(); $newData = simplexml_import_dom($envelope); $event->setData($newData); }