Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Issues debugging #39

Open
pursehouse opened this issue Mar 27, 2018 · 1 comment
Open

Issues debugging #39

pursehouse opened this issue Mar 27, 2018 · 1 comment

Comments

@pursehouse
Copy link

Code to reproduce the issue

this method blocks errors from being shown

    public function authenticate(ServerRequestInterface $request) : ?UserInterface
    {
        try {
            $result = $this->resourceServer->validateAuthenticatedRequest($request);
            $userId = $result->getAttribute('oauth_user_id', false);
            if (false !== $userId) {
                return $this->generateUser($userId, []);
            }
        } catch (OAuthServerException $exception) {
            return null;
        }
        return null;
    }

and then if I fix it and add

`throw $exception;`

into the catch, it runs...

    public static function accessDenied($hint = null, $redirectUri = null)
    {
        return new static(
            'The resource owner or authorization server denied the request.',

which still hides the actual error message.

I don't see any way to access that $hint value. So currently I have no way to troubleshoot why I am getting totally blank results on API call tests.

I changed the static() return to pass $hint and the error causing this scenario was

The JWT string must have two dots

but it will be the same issue with any error

@weierophinney
Copy link
Member

This repository has been closed and moved to mezzio/mezzio-authentication-oauth2; a new issue has been opened at mezzio/mezzio-authentication-oauth2#2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants