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; }