xervice / github-oauth
3.0.0
2018-08-27 09:33 UTC
Requires
- php: >=7.1.0
- guzzlehttp/guzzle: ^6.3.3
- propel/propel: 2.0.0-alpha8
- xervice/controller: 2.0.0
- xervice/core: ^4.0.0
- xervice/data-provider: ^2.0.0
- xervice/logger: ^2.0.0
- xervice/user: ^2.0.0
Requires (Dev)
README
Installation
composer require xervice/github-oath
Configuration
- You must add the controller to your routing
- You must add the GithubLogin class to the UserDependencyProvider::getLoginPluginList
$this->addRoute(GithubAuthConfig::LOGIN_PATH, GithubController::class, 'githubLoginAction', ['GET']); $this->addRoute(GithubAuthConfig::AUTH_PATH, GithubController::class, 'githubAuthAction', ['GET']); $this->addRoute(GithubAuthConfig::ERROR_PATH, GithubController::class, 'githubError', ['GET']); protected function addRoute(string $path, string $controller, string $action, array $methods);
Using
You must add the GithubController to your routing. The suggested paths are configured in the GithubAuthConfig.