Skip to content

Commit 13109d7

Browse files
committed
removing approval check - if this is a public page, we won't know what the user is.
1 parent 1fd8ad0 commit 13109d7

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

src/Controller/TokenController.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,13 @@ final public function __invoke(ServerRequestInterface $request, array $args): Re
2323
return $this->getResponse()->withStatus(409, "Invalid token");
2424
}
2525
*/
26-
$registration = $this->config->getClientRegistration($clientId);
27-
$approval = $this->checkApproval($clientId);
28-
29-
if ($approval) {
30-
$response = new \Laminas\Diactoros\Response();
31-
$server = new \Pdsinterop\Solid\Auth\Server($this->authServerFactory, $this->authServerConfig, $response);
32-
$response = $server->respondToAccessTokenRequest($request);
26+
$response = new \Laminas\Diactoros\Response();
27+
$server = new \Pdsinterop\Solid\Auth\Server($this->authServerFactory, $this->authServerConfig, $response);
28+
$response = $server->respondToAccessTokenRequest($request);
3329

34-
$codeInfo = $this->tokenGenerator->getCodeInfo($code);
35-
$response = $this->tokenGenerator->addIdTokenToResponse($response, $clientId, $codeInfo['user_id'], $_SESSION['nonce'], $this->config->getPrivateKey());
30+
$codeInfo = $this->tokenGenerator->getCodeInfo($code);
31+
$response = $this->tokenGenerator->addIdTokenToResponse($response, $clientId, $codeInfo['user_id'], $_SESSION['nonce'], $this->config->getPrivateKey());
3632

37-
return $response;
38-
}
39-
return new JsonResponse(array());
33+
return $response;
4034
}
4135
}

0 commit comments

Comments
 (0)