miniproto.session.models.AuthKey
miniproto.session.models.AuthKey
Section titled “miniproto.session.models.AuthKey”AuthKey(dc_id: int, key: bytes, key_id: int | None = None, created_at: datetime = _utc_now(), expires_at: datetime | None = None) -> NoneValidated non-empty MTProto authorization key bound to a positive DC.
Attributes:
- dc_id (
int) – Positive data-centre identifier that owns the key. - key (
bytes) – Secret authorization-key bytes, hidden fromrepr. - key_id (
int | None) – Optional server-derived authorization-key fingerprint. - created_at (
datetime) – Creation timestamp; aware input retains its original timezone and naive input assumes UTC. - expires_at (
datetime | None) – Optional expiry timestamp with the same aware/naive handling.
Raises:
ValueError– Ifdc_idis not positive orkeyis empty.