Compare commits

..

No commits in common. "120048918632ae058215a097b5136ad3b85e4cb2" and "cbe6d79ab52fa18a095545581e340ee4a35babac" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ class OAuthLoginController
{ {
$oAuthTokenRepository = new OAuthTokenRepository(); $oAuthTokenRepository = new OAuthTokenRepository();
$userRepository = new UserRepository(); $userRepository = new UserRepository();
$token = $oAuthTokenRepository->getByCode($this->request->post('code')); $token = $oAuthTokenRepository->getByCode($this->request->query('code'));
if ($token === null || $token->getExpiresDate() < new DateTime()) { if ($token === null || $token->getExpiresDate() < new DateTime()) {
return new JsonContent([ return new JsonContent([

View File

@ -23,8 +23,8 @@ Container::$routeCollection->group('login', function (SokoWeb\Routing\RouteColle
Container::$routeCollection->group('oauth', function (SokoWeb\Routing\RouteCollection $routeCollection) { Container::$routeCollection->group('oauth', function (SokoWeb\Routing\RouteCollection $routeCollection) {
$routeCollection->get('oauth-start', 'start', [RVR\Controller\OAuthLoginController::class, 'startOauth']); $routeCollection->get('oauth-start', 'start', [RVR\Controller\OAuthLoginController::class, 'startOauth']);
$routeCollection->get('oauth-finish', 'finish', [RVR\Controller\OAuthLoginController::class, 'finishOauth']); $routeCollection->get('oauth-finish', 'finish', [RVR\Controller\OAuthLoginController::class, 'finishOauth']);
$routeCollection->post('oauth-token', 'token', [RVR\Controller\OAuthLoginController::class, 'getToken']); $routeCollection->get('oauth-getToken', 'getToken', [RVR\Controller\OAuthLoginController::class, 'getToken']);
$routeCollection->get('oauth-jwtPublicKey', 'jwtPublicKey', [RVR\Controller\OAuthLoginController::class, 'getJwtPublicKey']); $routeCollection->get('oauth-getJwtPublicKey', 'getJwtPublicKey', [RVR\Controller\OAuthLoginController::class, 'getJwtPublicKey']);
}); });
Container::$routeCollection->group('password', function (SokoWeb\Routing\RouteCollection $routeCollection) { Container::$routeCollection->group('password', function (SokoWeb\Routing\RouteCollection $routeCollection) {
$routeCollection->get('password-requestReset', 'requestReset', [RVR\Controller\LoginController::class, 'getRequestPasswordResetForm']); $routeCollection->get('password-requestReset', 'requestReset', [RVR\Controller\LoginController::class, 'getRequestPasswordResetForm']);