diff --git a/composer.json b/composer.json index 5058e66..2a61285 100755 --- a/composer.json +++ b/composer.json @@ -25,13 +25,7 @@ "yiisoft/yii2": ">=2.0.13", "onelogin/php-saml": "~3.0.0" }, - "require-dev": { - "phpunit/phpunit": "5.0.*" - }, - "conflict": { - "phpunit/php-timer": ">=2" - }, - "autoload": { + "autoload": { "psr-4": { "asminog\\yii2saml\\": "src/" } diff --git a/tests/.gitkeep b/tests/.gitkeep deleted file mode 100755 index e69de29..0000000 diff --git a/tests/SamlTest.php b/tests/SamlTest.php deleted file mode 100755 index 4259ae0..0000000 --- a/tests/SamlTest.php +++ /dev/null @@ -1,26 +0,0 @@ -assertNotEquals($instance, null); - } - - public function testConfigFromArray() - { - $config = require __DIR__ . '/config/saml.php'; - - $instance = new Saml([ - 'config' => $config, - ]); - - $this->assertNotEquals($instance->config, []); - $this->assertEquals($instance->config['sp']['entityId'], 'service-provider'); - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100755 index edb056e..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,9 +0,0 @@ - false, - // Enable debug mode (to print errors) - 'debug' => true, - // Service Provider Data that we are deploying - 'sp' => array ( - // Identifier of the SP entity (must be a URI) - 'entityId' => 'service-provider', - // Specifies info about where and how the message MUST be - // returned to the requester, in this case our SP. - 'assertionConsumerService' => array ( - // URL Location where the from the IdP will be returned - 'url' => 'http://service-provider.com/acs', - // SAML protocol binding to be used when returning the - // message. Onelogin Toolkit supports for this endpoint the - // HTTP-Redirect binding only - 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST', - ), - // If you need to specify requested attributes, set a - // attributeConsumingService. nameFormat, attributeValue and - // friendlyName can be omitted. Otherwise remove this section. - "attributeConsumingService"=> array( - "ServiceName" => "SP test", - "serviceDescription" => "Test Service", - "requestedAttributes" => array( - array( - "name" => "", - "isRequired" => false, - "nameFormat" => "", - "friendlyName" => "", - "attributeValue" => "" - ) - ) - ), - // Specifies info about where and how the message MUST be - // returned to the requester, in this case our SP. - 'singleLogoutService' => array ( - // URL Location where the from the IdP will be returned - 'url' => 'http://service-provider.com/sls', - // SAML protocol binding to be used when returning the - // message. Onelogin Toolkit supports for this endpoint the - // HTTP-Redirect binding only - 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - ), - // Specifies constraints on the name identifier to be used to - // represent the requested subject. - // Take a look on lib/Saml2/Constants.php to see the NameIdFormat supported - 'NameIDFormat' => 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified', - // Usually x509cert and privateKey of the SP are provided by files placed at - // the certs folder. But we can also provide them with the following parameters - 'x509cert' => '', - 'privateKey' => '', - ), - // Identity Provider Data that we want connect with our SP - 'idp' => array ( - // Identifier of the IdP entity (must be a URI) - 'entityId' => 'identity-provider', - // SSO endpoint info of the IdP. (Authentication Request protocol) - 'singleSignOnService' => array ( - // URL Target of the IdP where the SP will send the Authentication Request Message - 'url' => 'http://identity-provider.com/login', - // SAML protocol binding to be used when returning the - // message. Onelogin Toolkit supports for this endpoint the - // HTTP-POST binding only - 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - ), - // SLO endpoint info of the IdP. - 'singleLogoutService' => array ( - // URL Location of the IdP where the SP will send the SLO Request - 'url' => 'http://identity-provider.com/logout', - // SAML protocol binding to be used when returning the - // message. Onelogin Toolkit supports for this endpoint the - // HTTP-Redirect binding only - 'binding' => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect', - ), - // Public x509 certificate of the IdP - 'x509cert' => '', - /* - * Instead of use the whole x509cert you can use a fingerprint - * (openssl x509 -noout -fingerprint -in "idp.crt" to generate it, - * or add for example the -sha256 , -sha384 or -sha512 parameter) - * - * If a fingerprint is provided, then the certFingerprintAlgorithm is required in order to - * let the toolkit know which Algorithm was used. Possible values: sha1, sha256, sha384 or sha512 - * 'sha1' is the default value. - */ - // 'certFingerprint' => '', - // 'certFingerprintAlgorithm' => 'sha1', - ), -]; \ No newline at end of file