From 0b6ac0c8e44fb6d877f440d350121c1f69acd7af Mon Sep 17 00:00:00 2001 From: Jeroenvdvalk Date: Tue, 27 Feb 2018 10:45:30 +0100 Subject: [PATCH 1/3] Fixed for breaking change in opauth/opauth 0.4.5. --- Controller/OpauthAppController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controller/OpauthAppController.php b/Controller/OpauthAppController.php index e3afd46..7e03abe 100644 --- a/Controller/OpauthAppController.php +++ b/Controller/OpauthAppController.php @@ -54,10 +54,10 @@ public function callback(){ } break; case 'post': - $response = unserialize(base64_decode( $_POST['opauth'] )); + $response = json_decode(base64_decode( $_POST['opauth'], true)); break; case 'get': - $response = unserialize(base64_decode( $_GET['opauth'] )); + $response = json_decode(base64_decode( $_GET['opauth'], true)); break; default: echo 'Error: Unsupported callback_transport.'."
\n"; @@ -138,4 +138,4 @@ protected function _loadOpauth($config = null, $run = false){ App::import('Vendor', 'Opauth.Opauth/lib/Opauth/Opauth'); $this->Opauth = new Opauth( $config, $run ); } -} \ No newline at end of file +} From 178181eafe6927425781fd8230745bea926a4993 Mon Sep 17 00:00:00 2001 From: Jeroenvdvalk Date: Tue, 27 Feb 2018 11:02:19 +0100 Subject: [PATCH 2/3] Added composer.json to master. --- composer.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..9e63418 --- /dev/null +++ b/composer.json @@ -0,0 +1,23 @@ +{ + "name": "uzyn/cakephp-opauth", + "description": "Opauth plugin for CakePHP v2.x, allowing simple plug-n-play 3rd-party authentication with CakePHP", + "type": "cakephp-plugin", + "keywords": ["cakephp", "opauth", "authentication", "auth", "oauth"], + "homepage": "http://opauth.org", + "license": "MIT", + "authors": [ + { + "name": "U-Zyn Chua", + "email": "chua@uzyn.com", + "homepage": "http://uzyn.com" + } + ], + "require": { + "php": ">=5.2.0", + "composer/installers": "1.*", + "opauth/opauth": ">=0.2.0" + }, + "extra": { + "installer-name": "Opauth" + } +} From 24777cf38e53ff4d78401f4edaf305f26803120c Mon Sep 17 00:00:00 2001 From: Jeroenvdvalk Date: Tue, 27 Feb 2018 11:06:41 +0100 Subject: [PATCH 3/3] Oopsie... --- Controller/OpauthAppController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Controller/OpauthAppController.php b/Controller/OpauthAppController.php index 7e03abe..41733c2 100644 --- a/Controller/OpauthAppController.php +++ b/Controller/OpauthAppController.php @@ -54,10 +54,10 @@ public function callback(){ } break; case 'post': - $response = json_decode(base64_decode( $_POST['opauth'], true)); + $response = json_decode(base64_decode( $_POST['opauth']), true); break; case 'get': - $response = json_decode(base64_decode( $_GET['opauth'], true)); + $response = json_decode(base64_decode( $_GET['opauth']), true); break; default: echo 'Error: Unsupported callback_transport.'."
\n";