concrete/src/Api/OAuth/Validator/DefaultValidator.php
public function validateAuthorization(ServerRequestInterface $request)
    {
        $user = $this->app->make(User::class);

        // Allow logged in users to bypass API authentication entirely if the route allows it
        // This functionality is NOT READY. We will not allow this yet.
        /*
        $route = $request->getAttribute('_route');

        if ($user->checkLogin()) {
            // Return the request with additional attributes
            return $request
                ->withAttribute('oauth_access_token_id', null)
                ->withAttribute('oauth_client_id', null)
                ->withAttribute('oauth_user_id', null)
                ->withAttribute('oauth_scopes', 'session');

            return $request;
        }
        */

        // Delegate the rest to the passed in validator
        return $this->validator->validateAuthorization($request);
    }
public function validateAuthorization(ServerRequestInterface $request)
    {
        $user = $this->app->make(User::class);

        // Allow logged in users to bypass API authentication entirely if the route allows it
        // This functionality is NOT READY. We will not allow this yet.
        /*
        $route = $request->getAttribute('_route');

        if ($user->checkLogin()) {
            // Return the request with additional attributes
            return $request
                ->withAttribute('oauth_access_token_id', null)
                ->withAttribute('oauth_client_id', null)
                ->withAttribute('oauth_user_id', null)
                ->withAttribute('oauth_scopes', 'session');

            return $request;
        }
        */

        // Delegate the rest to the passed in validator
        return $this->validator->validateAuthorization($request);
    }
public function validateAuthorization ( ServerRequestInterface $ request ) { $ user = $ this -> app -> make ( User :: class ) ; // Allow logged in users to bypass API authentication entirely if the route allows it // This functionality is NOT READY. We will not allow this yet. /*
        $route = $request->getAttribute('_route');

        if ($user->checkLogin()) {
            // Return the request with additional attributes
            return $request
                ->withAttribute('oauth_access_token_id', null)
                ->withAttribute('oauth_client_id', null)
                ->withAttribute('oauth_user_id', null)
                ->withAttribute('oauth_scopes', 'session');

            return $request;
        }
        */ // Delegate the rest to the passed in validator return $ this -> validator -> validateAuthorization ( $ request ) ; }
Determine the access token in the authorization header and append OAUth properties to the request
as attributes.

@param ServerRequestInterface $request

@return ServerRequestInterface
Determine the access token in the authorization header and append OAUth properties to the request as attributes .