diff --git a/Controller/OpauthAppController.php b/Controller/OpauthAppController.php index e3afd46..41733c2 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 +} 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" + } +}