public function loadToken($token, $validate = true, $verify = true)
    {
        $token = $this->getParser()->parse((string) $token);

        if ($validate && !$this->validateToken($token)) {
            return null;
        }
        if ($verify && !$this->verifyToken($token)) {
            return null;
        }

        return $token;
    }
public function loadToken($token, $validate = true, $verify = true)
    {
        $token = $this->getParser()->parse((string) $token);

        if ($validate && !$this->validateToken($token)) {
            return null;
        }
        if ($verify && !$this->verifyToken($token)) {
            return null;
        }

        return $token;
    }
public function loadToken ( $ token , $ validate = true , $ verify = true ) { $ token = $ this -> getParser ( ) -> parse ( ( string ) $ token ) ; if ( $ validate && ! $ this -> validateToken ( $ token ) ) { return null ; } if ( $ verify && ! $ this -> verifyToken ( $ token ) ) { return null ; } return $ token ; }
Parses the JWT and returns a token class
@param string $token JWT
@return Token|null
Parses the JWT and returns a token class