src/includes/classes/Core/Utils/OAuthServer.php
public function resourceRequest(Request $Request, Response $Response): Request
    {
        try { // Authenticate resource request.
            $ResourceServer = $this->resourceServer();
            return $Request = $ResourceServer->validateAuthenticatedRequest($Request);
            //
        } catch (OAuthServerException $Exception) {
            $Response = $Exception->generateHttpResponse($Response);
            $Response->output(['exit' => true]);
            //
        } catch (\Throwable $Exception) {
            $Exception = new OAuthServerException($Exception->getMessage(), 0, 'unknown', 500);
            $Response  = $Exception->generateHttpResponse($Response);
            $Response->output(['exit' => true]);
        }
    }
public function resourceRequest(Request $Request, Response $Response): Request
    {
        try { // Authenticate resource request.
            $ResourceServer = $this->resourceServer();
            return $Request = $ResourceServer->validateAuthenticatedRequest($Request);
            //
        } catch (OAuthServerException $Exception) {
            $Response = $Exception->generateHttpResponse($Response);
            $Response->output(['exit' => true]);
            //
        } catch (\Throwable $Exception) {
            $Exception = new OAuthServerException($Exception->getMessage(), 0, 'unknown', 500);
            $Response  = $Exception->generateHttpResponse($Response);
            $Response->output(['exit' => true]);
        }
    }
Filter resource request.

@since 17xxxx OAuth utils.

@param Request  $Request  Request.
@param Response $Response Response.

@return Request w/ `oauth_` attributes.

If access token is valid the following attributes are set:
- `oauth_access_token_id` the access token identifier.
- `oauth_client_id` the client identifier.
- `oauth_user_id` the user identifier represented by the access token.
- `oauth_scopes` an array of string scope identifiers.