Open basz opened 8 years ago
This is what I currently use.
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $out = null) { if ($accessToken = $request->getAttribute('oauth_token')) { /** @var \ZfrOAuth2\Server\Model\AccessToken $accessToken */ $adapter = new Callback(function ($identity, $credential) { return $identity; }); $adapter->setIdentity($accessToken->getOwner()); $this->authenticationService->authenticate($adapter); } $response = $out($request, $response); return $response; }
This is what I currently use.