def verify_token_type(self) -> None:
        """
        Ensures that the token type claim is present and has the correct value.
        """
        try:
            token_type = self.payload[api_settings.TOKEN_TYPE_CLAIM]
        except KeyError as e:
            raise TokenError(_("Token has no type")) from e

        if self.token_type != token_type:
            raise TokenError(_("Token has wrong type"))

        Ensures that the token type claim is present and has the correct value.
        
rest_framework_simplejwt/tokens.py