OauthLinkInfo class final

Information about the OAuth authorization

Inheritance

Constructors

OauthLinkInfo({required int userId, required String url, required String domain, required bool fromApp, required String verifiedAppName, required int botUserId, required bool requestWriteAccess, required bool requestPhoneNumberAccess, required bool requestTonWalletAccess, required String dappClientId, required String tonConnectManifestUrl, required String tonProofPayload, required String browser, required String platform, required String ipAddress, required String location, required bool matchCodeFirst, required List<String> matchCodes, dynamic extra, int? clientId})
Information about the OAuth authorization
const
OauthLinkInfo.fromJson(Map<String, dynamic> json)
Parses a OauthLinkInfo from TDLib JSON.
factory

Properties

botUserId → int
User identifier of a bot linked with the website
final
browser → String
The version of a browser used for the authorization
final
clientId → int?
Identifier of the TDLib client that sent this object.
final
dappClientId → String
Hex-encoded public X25519 key of the dApp; may be empty if TON wallet access wasn't requested
final
domain → String
A domain of the URL
final
extra → dynamic
"@extra" of the request this object answers.
final
fromApp → bool
True, if the authorization originates from an application
final
hashCode → int
The hash code for this object.
no setterinherited
ipAddress → String
IP address from which the authorization is performed, in human-readable format
final
location → String
Human-readable description of a country and a region from which the authorization is performed, based on the IP address
final
matchCodeFirst → bool
True, if code matching dialog must be shown first and checkOauthRequestMatchCode must be called before acceptOauthRequest. Otherwise, checkOauthRequestMatchCode must not be called
final
matchCodes → List<String>
The list of codes to match; may be empty if irrelevant
final
platform → String
Operating system the browser is running on
final
requestPhoneNumberAccess → bool
True, if the user must be asked for the permission to share their phone number
final
requestTonWalletAccess → bool
True, if access to the user's TON wallet is requested by the app. If true and the user agrees to give access, then use createTonConnectSession with dapp_client_id and ton_connect_manifest_url to create the TON Connect session, then setTonConnectSessionWalletClientId, then create a tonWalletOwnershipProof for the given domain with the payload ton_proof_payload, and then pass all data to acceptOauthRequest in the parameter ton_connect_connect_data
final
requestWriteAccess → bool
True, if the user must be asked for the permission to the bot to send them messages
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tonConnectManifestUrl → String
URL of the TON Connect manifest of the dApp; may be empty if TON wallet access wasn't requested
final
tonProofPayload → String
Payload for TON wallet ownership proof; may be empty if TON wallet access wasn't requested
final
url → String
An HTTP URL where the user authorizes
final
userId → int
Identifier of the user for which the link was generated; may be 0 if unknown. The corresponding user may be unknown. If the user is logged in the application, then they must be chosen for authorization by default
final
verifiedAppName → String
Verified name of the application; if empty, then "Unverified App" must be shown instead
final

Methods

copyWith({int? userId, String? url, String? domain, bool? fromApp, String? verifiedAppName, int? botUserId, bool? requestWriteAccess, bool? requestPhoneNumberAccess, bool? requestTonWalletAccess, String? dappClientId, String? tonConnectManifestUrl, String? tonProofPayload, String? browser, String? platform, String? ipAddress, String? location, bool? matchCodeFirst, List<String>? matchCodes, dynamic extra, int? clientId}) → OauthLinkInfo
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

CONSTRUCTOR → const String
TDLib type name.