{"id":22367494,"url":"https://github.com/mikesmullin/cakephp-oauth2-server-plugin","last_synced_at":"2025-07-24T23:39:57.501Z","repository":{"id":66926524,"uuid":"2166320","full_name":"mikesmullin/CakePHP-OAuth2-Server-Plugin","owner":"mikesmullin","description":"CakePHP OAuth2 Server Plugin","archived":false,"fork":false,"pushed_at":"2011-08-19T06:36:59.000Z","size":128,"stargazers_count":19,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T11:48:40.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikesmullin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-06T20:20:31.000Z","updated_at":"2024-11-26T00:52:00.000Z","dependencies_parsed_at":"2023-02-20T14:30:43.329Z","dependency_job_id":null,"html_url":"https://github.com/mikesmullin/CakePHP-OAuth2-Server-Plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikesmullin/CakePHP-OAuth2-Server-Plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-OAuth2-Server-Plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-OAuth2-Server-Plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-OAuth2-Server-Plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-OAuth2-Server-Plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikesmullin","download_url":"https://codeload.github.com/mikesmullin/CakePHP-OAuth2-Server-Plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikesmullin%2FCakePHP-OAuth2-Server-Plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266923038,"owners_count":24006996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T18:18:28.005Z","updated_at":"2025-07-24T23:39:57.472Z","avatar_url":"https://github.com/mikesmullin.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"CakePHP OAuth2 Server Plugin by Mike Smullin \u003cmike@smullindesign.com\u003e\n============\n\n** Host your own OAuth2 API Server Authentication system like Facebook, Twitter, etc. **\n\nPre-requisites\n------------\n\n* CakePHP User Model defined in app\n* No conflict with using CakePHP Auth Component in plugin\n* CakePHP Migrations plugin installed\n\nInstallation \u0026 Usage\n------------\n\nPlace this directory in your plugins dir:\n\n    git submodule add git://github.com/mikesmullin/CakePHP-OAuth2-Server-Plugin.git ./app/plugins/o_auth2_server/\n\nDownload the latest version of Tim Ridgley's oauth2-php into `./app/plugins/oauth/vendors/oauth2-php/`, as well:\n\n    git submodule update --init --recursive\n\nAdd this line to your ./app/config/routes.php:\n\n    // include CakePHP-OAuth2-Server-Plugin routes\n    require_once App::pluginPath('OAuth2Server') .'config'. DS .'routes.php';\n\nRun this plugin's migrations (requires CakePHP Migrations plugin by CakeDC)\n\n    cake migration -plugin OAuth2Server\n\nCustomize the file `./app/plugins/oauth/config/oauth.php` to fit your use case.\n\nAdd this plugin's OAuth2 component to your AppController:\n\n    var $components = array('OAuth2Server.OAuth2');\n\nAdd this override to your AppController:\n\n    /**\n     * Override isAuthorized() callback.\n     * Disables placeholder error and changes default to null,\n     * which has a special meaning for OAuth2Server plugin.\n     *\n     * @return Boolean\n     *   null = check normally\n     *   true = force allow without check\n     *   false = force disallow without check\n     */\n    function isAuthorized() {\n        return null; // check normally\n    }\n\nAuthentication verification happens automatically any time getCurrentUserId() is called:\n\n    try {\n      $this-\u003eOAuth2-\u003egetCurrentUserId(true); // true is optional and default; means throw exception on failure\n    } catch (Exception $e) {\n      // handle problems with access_token here\n    }\n\nCredits\n------------\n\nCakePHP-OAuth2-Server-Plugin is written by Mike Smullin and is released under the WTFPL.\n\nOAuth2-PHP is written by Tim Ridgely and licensed under MIT. see http://code.google.com/p/oauth2-php/\n\nCakePHP Migrations is written by CakeDC. see https://github.com/CakeDC/migrations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesmullin%2Fcakephp-oauth2-server-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikesmullin%2Fcakephp-oauth2-server-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikesmullin%2Fcakephp-oauth2-server-plugin/lists"}