def METHOD_NAME(self, s, key, claims_cls=None,
           claims_options=None, claims_params=None):
    """Decode the JWT with the given key. This is similar with
    :meth:`verify`, except that it will raise BadSignatureError when
    signature doesn't match.
    :param s: text of JWT
    :param key: key used to verify the signature
    :param claims_cls: class to be used for JWT claims
    :param claims_options: `options` parameters for claims_cls
    :param claims_params: `params` parameters for claims_cls
    :return: claims_cls instance
    :raise: BadSignatureError
    """
    if claims_cls is None:
        claims_cls = JWTClaims
    if callable(key):
        load_key = key
    else:
        load_key = create_load_key(prepare_raw_key(key))
    s = to_bytes(s)
    dot_count = s.count(b'.')
    if dot_count == 2:
        data = self._jws.deserialize_compact(s, load_key, decode_payload)
    elif dot_count == 4:
        data = self._jwe.deserialize_compact(s, load_key, decode_payload)
    else:
        raise DecodeError('Invalid input segments length')
    return claims_cls(
        data['payload'], data['header'],
        options=claims_options,
        params=claims_params,
    )