diff --git a/.travis.yml b/.travis.yml index 8debc25..23a5b82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ language: php php: - - 5.4 - - 5.5 - 5.6 + - 7.0 + - 7.1 + - 7.2 before_script: diff --git a/composer.json b/composer.json index 1f7433a..d88e72a 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "keywords": ["laravel","saml", "saml2", "onelogin"], "homepage": "https://github.com/aacotroneo/laravel-saml2", "license": "MIT", - "version": "0.11.1", + "version": "1.0.0", "authors": [ { "name": "aacotroneo", @@ -15,7 +15,7 @@ "php": ">=5.4.0", "ext-openssl": "*", "illuminate/support": ">=5.0.0", - "onelogin/php-saml": "^2.10" + "onelogin/php-saml": "^3.0.0" }, "require-dev": { "mockery/mockery": "0.9.*" diff --git a/src/Aacotroneo/Saml2/Saml2Auth.php b/src/Aacotroneo/Saml2/Saml2Auth.php index d71c0ea..d3fb7e5 100644 --- a/src/Aacotroneo/Saml2/Saml2Auth.php +++ b/src/Aacotroneo/Saml2/Saml2Auth.php @@ -2,9 +2,9 @@ namespace Aacotroneo\Saml2; -use OneLogin_Saml2_Auth; -use OneLogin_Saml2_Error; -use OneLogin_Saml2_Utils; +use OneLogin\Saml2\Auth as OneLogin_Saml2_Auth; +use OneLogin\Saml2\Error as OneLogin_Saml2_Error; +use OneLogin\Saml2\Utils as OneLogin_Saml2_Utils; use Aacotroneo\Saml2\Events\Saml2LogoutEvent; use Log; diff --git a/src/Aacotroneo/Saml2/Saml2ServiceProvider.php b/src/Aacotroneo/Saml2/Saml2ServiceProvider.php index 29bb5ba..c1f52f0 100644 --- a/src/Aacotroneo/Saml2/Saml2ServiceProvider.php +++ b/src/Aacotroneo/Saml2/Saml2ServiceProvider.php @@ -1,7 +1,8 @@ shouldReceive('isAuthenticated')->andReturn('return'); @@ -29,7 +30,7 @@ public function testIsAuthenticated() public function testLogin() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('login')->once(); $saml2->login(); @@ -43,7 +44,7 @@ public function testLogout() $expectedNameIdFormat = 'urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified'; $expectedStay = true; $expectedNameIdNameQualifier = 'name_id_name_qualifier'; - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('logout') ->with($expectedReturnTo, [], $expectedNameId, $expectedSessionIndex, $expectedStay, $expectedNameIdFormat, $expectedNameIdNameQualifier) @@ -54,7 +55,7 @@ public function testLogout() public function testAcsError() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('processResponse')->once(); $auth->shouldReceive('getErrors')->once()->andReturn(array('errors')); @@ -67,7 +68,7 @@ public function testAcsError() public function testAcsNotAutenticated() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('processResponse')->once(); $auth->shouldReceive('getErrors')->once()->andReturn(null); @@ -80,7 +81,7 @@ public function testAcsNotAutenticated() public function testAcsOK() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('processResponse')->once(); $auth->shouldReceive('getErrors')->once()->andReturn(null); @@ -93,7 +94,7 @@ public function testAcsOK() public function testSlsError() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('processSLO')->once(); $auth->shouldReceive('getErrors')->once()->andReturn('errors'); @@ -105,7 +106,7 @@ public function testSlsError() public function testSlsOK() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('processSLO')->once(); $auth->shouldReceive('getErrors')->once()->andReturn(null); @@ -117,7 +118,7 @@ public function testSlsOK() public function testCanGetLastError() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $auth->shouldReceive('getLastErrorReason')->andReturn('lastError'); @@ -126,7 +127,7 @@ public function testCanGetLastError() } public function testGetUserAttribute() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $user = $saml2->getSaml2User(); @@ -139,7 +140,7 @@ public function testGetUserAttribute() { } public function testParseSingleUserAttribute() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $user = $saml2->getSaml2User(); @@ -154,7 +155,7 @@ public function testParseSingleUserAttribute() { } public function testParseMultipleUserAttributes() { - $auth = m::mock('OneLogin_Saml2_Auth'); + $auth = m::mock('OneLogin\Saml2\Auth'); $saml2 = new Saml2Auth($auth); $user = $saml2->getSaml2User();