src/Authenticator/TokenAuthenticator.php
protected function getToken(ServerRequestInterface $request)
    {
        $token = $this->getTokenFromHeader($request, $this->getConfig('header'));
        if ($token === null) {
            $token = $this->getTokenFromQuery($request, $this->getConfig('queryParam'));
        }

        $prefix = $this->getConfig('tokenPrefix');
        if ($prefix !== null && is_string($token)) {
            return $this->stripTokenPrefix($token, $prefix);
        }

        return $token;
    }
protected function getToken(ServerRequestInterface $request)
    {
        $token = $this->getTokenFromHeader($request, $this->getConfig('header'));
        if ($token === null) {
            $token = $this->getTokenFromQuery($request, $this->getConfig('queryParam'));
        }

        $prefix = $this->getConfig('tokenPrefix');
        if ($prefix !== null && is_string($token)) {
            return $this->stripTokenPrefix($token, $prefix);
        }

        return $token;
    }
protected function getToken ( ServerRequestInterface $ request ) { $ token = $ this -> getTokenFromHeader ( $ request , $ this -> getConfig ( 'header' ) ) ; if ( $ token === null ) { $ token = $ this -> getTokenFromQuery ( $ request , $ this -> getConfig ( 'queryParam' ) ) ; } $ prefix = $ this -> getConfig ( 'tokenPrefix' ) ; if ( $ prefix !== null && is_string ( $ token ) ) { return $ this -> stripTokenPrefix ( $ token , $ prefix ) ; } return $ token ; }
Checks if the token is in the headers or a request parameter

@param \Psr\Http\Message\ServerRequestInterface $request The request that contains login information.
@return string|null
Checks if the token is in the headers or a request parameter