WebAuth class

Constructors

WebAuth(String _authEndpoint, Network _network, String _serverSigningKey, String _serverHomeDomain, {Client? httpClient})
Constructor

Properties

gracePeriod int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
httpClient ↔ Client
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getChallenge(String clientAccountId, [int? memo, String? homeDomain, String? clientDomain]) Future<String>
Get challenge transaction from the web auth server. Returns base64 xdr transaction envelope received from the web auth server.
getChallengeResponse(String accountId, [int? memo, String? homeDomain, String? clientDomain]) Future<ChallengeResponse>
jwtToken(String clientAccountId, List<KeyPair> signers, {int? memo, String? homeDomain, String? clientDomain, KeyPair? clientDomainAccountKeyPair, Future<String> clientDomainSigningDelegate(String transactionXdr)?}) Future<String>
Get JWT token for wallet.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendSignedChallengeTransaction(String base64EnvelopeXDR) Future<String>
Sends the signed challenge transaction back to the web auth server to obtain the jwt token. In case of success, it returns the jwt token obtained from the web auth server.
signTransaction(String challengeTransaction, List<KeyPair> signers) String
toString() String
A string representation of this object.
inherited
validateChallenge(String challengeTransaction, String userAccountId, String? clientDomainAccountId, [int? timeBoundsGracePeriod, int? memo]) → void
Validates the challenge transaction received from the web auth server.

Operators

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

Static Methods

fromDomain(String domain, Network network, {Client? httpClient}) Future<WebAuth>
Creates a WebAuth instance by loading the needed data from the stellar.toml file hosted on the given domain. e.g. fromDomain("soneso.com", Network.TESTNET)