src/Addons/JWTAuth/JWTAuth.php
public function parseToken($method = 'bearer', $header = 'authorization', $query = 'token')
    {
        if (! $token = $this->parseAuthHeader($header, $method)) {
            if (! $token = $this->request->{$query}) {
                if (! $token = $this->request->header('Token')) {
                    throw new JWTException('The token could not be parsed from the request', 400);
                }
            }
        }

        return $this->setToken($token);
    }
public function parseToken($method = 'bearer', $header = 'authorization', $query = 'token')
    {
        if (! $token = $this->parseAuthHeader($header, $method)) {
            if (! $token = $this->request->{$query}) {
                if (! $token = $this->request->header('Token')) {
                    throw new JWTException('The token could not be parsed from the request', 400);
                }
            }
        }

        return $this->setToken($token);
    }
public function parseToken ( $ method = 'bearer' , $ header = 'authorization' , $ query = 'token' ) { if ( ! $ token = $ this -> parseAuthHeader ( $ header , $ method ) ) { if ( ! $ token = $ this -> request -> { $ query } ) { if ( ! $ token = $ this -> request -> header ( 'Token' ) ) { throw new JWTException ( 'The token could not be parsed from the request' , 400 ) ; } } } return $ this -> setToken ( $ token ) ; }
Parse the token from the request.

@param string $query

@return JWTAuth
Parse the token from the request .