from _typeshed import Incomplete

from jwcrypto.common import JWException

JWSHeaderRegistry: Incomplete
default_allowed_algs: Incomplete

class InvalidJWSSignature(JWException):
    def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...

class InvalidJWSObject(JWException):
    def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...

class InvalidJWSOperation(JWException):
    def __init__(self, message: str | None = None, exception: BaseException | None = None) -> None: ...

class JWSCore:
    alg: Incomplete
    engine: Incomplete
    key: Incomplete
    header: Incomplete
    protected: Incomplete
    payload: Incomplete
    def __init__(self, alg, key, header, payload, algs: Incomplete | None = None) -> None: ...
    def sign(self): ...
    def verify(self, signature): ...

class JWS:
    objects: Incomplete
    verifylog: Incomplete
    header_registry: Incomplete
    def __init__(self, payload: Incomplete | None = None, header_registry: Incomplete | None = None) -> None: ...
    @property
    def allowed_algs(self): ...
    @allowed_algs.setter
    def allowed_algs(self, algs) -> None: ...
    @property
    def is_valid(self): ...
    def verify(self, key, alg: Incomplete | None = None, detached_payload: Incomplete | None = None) -> None: ...
    def deserialize(self, raw_jws, key: Incomplete | None = None, alg: Incomplete | None = None) -> None: ...
    def add_signature(
        self, key, alg: Incomplete | None = None, protected: Incomplete | None = None, header: Incomplete | None = None
    ) -> None: ...
    def serialize(self, compact: bool = False): ...
    @property
    def payload(self): ...
    def detach_payload(self) -> None: ...
    @property
    def jose_header(self): ...
    @classmethod
    def from_jose_token(cls, token): ...
    def __eq__(self, other: object) -> bool: ...
