Skip to content

Q: Should we document or provide Zf AuthenticationService integration #71

Description

@basz

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;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions