Compare commits
3 Commits
cbe6d79ab5
...
84df948012
Author | SHA1 | Date | |
---|---|---|---|
84df948012 | |||
1200489186 | |||
74d0b24f5f |
@ -89,7 +89,7 @@ class OAuthLoginController
|
||||
{
|
||||
$oAuthTokenRepository = new OAuthTokenRepository();
|
||||
$userRepository = new UserRepository();
|
||||
$token = $oAuthTokenRepository->getByCode($this->request->query('code'));
|
||||
$token = $oAuthTokenRepository->getByCode($this->request->post('code'));
|
||||
|
||||
if ($token === null || $token->getExpiresDate() < new DateTime()) {
|
||||
return new JsonContent([
|
||||
|
4
web.php
4
web.php
@ -23,8 +23,8 @@ Container::$routeCollection->group('login', function (SokoWeb\Routing\RouteColle
|
||||
Container::$routeCollection->group('oauth', function (SokoWeb\Routing\RouteCollection $routeCollection) {
|
||||
$routeCollection->get('oauth-start', 'start', [RVR\Controller\OAuthLoginController::class, 'startOauth']);
|
||||
$routeCollection->get('oauth-finish', 'finish', [RVR\Controller\OAuthLoginController::class, 'finishOauth']);
|
||||
$routeCollection->get('oauth-getToken', 'getToken', [RVR\Controller\OAuthLoginController::class, 'getToken']);
|
||||
$routeCollection->get('oauth-getJwtPublicKey', 'getJwtPublicKey', [RVR\Controller\OAuthLoginController::class, 'getJwtPublicKey']);
|
||||
$routeCollection->post('oauth-token', 'token', [RVR\Controller\OAuthLoginController::class, 'getToken']);
|
||||
$routeCollection->get('oauth-jwtPublicKey', 'jwtPublicKey', [RVR\Controller\OAuthLoginController::class, 'getJwtPublicKey']);
|
||||
});
|
||||
Container::$routeCollection->group('password', function (SokoWeb\Routing\RouteCollection $routeCollection) {
|
||||
$routeCollection->get('password-requestReset', 'requestReset', [RVR\Controller\LoginController::class, 'getRequestPasswordResetForm']);
|
||||
|
Loading…
Reference in New Issue
Block a user