MadelineProtoDocs/docs/PHPInternal/danog/MadelineProto/MTProto/TempAuthKey.md
2020-10-15 19:11:10 +02:00

3.2 KiB

title: danog\MadelineProto\MTProto\TempAuthKey: MTProto temporary auth key. description:

danog\MadelineProto\MTProto\TempAuthKey

Back to index

Author: Daniil Gentili daniil@daniil.it

MTProto temporary auth key.

Method list:

  • init(bool $init): void
  • isInited(): bool
  • bind(\danog\MadelineProto\MTProto\PermAuthKey|null $bound, bool $pfs): void
  • isBound(): bool
  • isAuthorized(): bool
  • authorized(bool $authorized): void
  • expires(int $expires): void
  • expired(): bool
  • jsonSerialize(): array
  • setAuthKey(string $authKey): void
  • hasAuthKey(): bool
  • getAuthKey(): string
  • getID(): string
  • setServerSalt(string $salt): void
  • getServerSalt(): string
  • hasServerSalt(): bool

Methods:

init(bool $init): void

Init or deinit connection for auth key.

Parameters:

  • $init: bool Init or deinit

Generated by danog/phpdoc

isInited(): bool

Check if connection is inited for auth key.


Generated by danog/phpdoc

bind(\danog\MadelineProto\MTProto\PermAuthKey|null $bound, bool $pfs): void

Bind auth key.

Parameters:

  • $bound: \danog\MadelineProto\MTProto\PermAuthKey|null Permanent auth key
  • $pfs: bool Whether to bind using PFS

See also:


Generated by danog/phpdoc

isBound(): bool

Check if auth key is bound.


Generated by danog/phpdoc

isAuthorized(): bool

Check if we are logged in.


Generated by danog/phpdoc

authorized(bool $authorized): void

Set the authorized boolean.

Parameters:

  • $authorized: bool Whether we are authorized

Generated by danog/phpdoc

expires(int $expires): void

Set expiration date of temporary auth key.

Parameters:

  • $expires: int Expiration date

Generated by danog/phpdoc

expired(): bool

Check if auth key has expired.


Generated by danog/phpdoc

jsonSerialize(): array

JSON serialization function.


Generated by danog/phpdoc

setAuthKey(string $authKey): void

Set auth key.

Parameters:

  • $authKey: string Authorization key

Generated by danog/phpdoc

hasAuthKey(): bool

Check if auth key is present.


Generated by danog/phpdoc

getAuthKey(): string

Get auth key.


Generated by danog/phpdoc

getID(): string

Get auth key ID.


Generated by danog/phpdoc

setServerSalt(string $salt): void

Set server salt.

Parameters:

  • $salt: string Server salt

Generated by danog/phpdoc

getServerSalt(): string

Get server salt.


Generated by danog/phpdoc

hasServerSalt(): bool

Check if has server salt.


Generated by danog/phpdoc


Generated by danog/phpdoc