Lcobucci\JWT\Parser::splitJwt PHP Method

splitJwt() protected method

Splits the JWT string into an array
protected splitJwt ( string $jwt ) : array
$jwt string
return array
    protected function splitJwt(string $jwt) : array
    {
        $data = explode('.', $jwt);
        if (count($data) != 3) {
            throw new InvalidArgumentException('The JWT string must have two dots');
        }
        return $data;
    }