setResponse( $this->getAccessTokenGenerator()->generate( $this->getPsrRequest(), $this->getPsrResponse() ) ); } catch (OAuthServerException $exception) { $this->setResponse($exception->generateHttpResponse($this->getPsrResponse())); } } public function jwks(): void { $response = $this->getPsrResponse() ->withHeader('ContentType', 'application/json') ->withBody(stream_for(json_encode($this->getJwksRepository()->find()))); $this->setResponse($response); } public function oidc(): void { $response = $this->getOidcLoginAuthenticator() ->authenticate($this->getPsrRequest(), $this->getPsrResponse()); $this->setResponse($response); } public function oidcInitiation(): void { // Create the OIDC initiator $initiator = new OidcInitiator($this->getLti1p3RegistrationRepository()); // Perform the OIDC initiation (including state generation) $message = $initiator->initiate($this->getPsrRequest()); $this->redirect($message->toUrl()); } private function getJwksRepository(): JwksRepositoryInterface { return $this->getServiceLocator()->get(CachedPlatformJwksRepository::class); } private function getOidcLoginAuthenticator(): OidcLoginAuthenticatorInterface { return $this->getServiceLocator()->get(OidcLoginAuthenticatorProxy::class); } private function getAccessTokenGenerator(): AccessTokenResponseGeneratorInterface { return $this->getServiceLocator()->get(AccessTokenResponseGenerator::class); } private function getLti1p3RegistrationRepository(): RegistrationRepositoryInterface { return $this->getServiceLocator()->get(Lti1p3RegistrationRepository::class); } }