ChallengeValidationErrorInvalidSourceAccount class

Validation error thrown when an operation has an invalid source account.

According to SEP-10, challenge transactions have strict requirements for operation source accounts:

First operation:

  • Source account must match the client's account ID that requested the challenge
  • This proves the challenge is intended for the specific client

Subsequent operations:

  • For "client_domain" operations: source must be the client domain's account ID
  • For other operations: source must be the server's signing key account ID
  • All operations must have a source account set (not null)

Invalid source accounts indicate:

  • Challenge was generated incorrectly by the server
  • Transaction has been tampered with
  • Challenge is intended for a different account

This validation prevents attacks where a challenge for one account is used to authenticate a different account.

Example handling:

try {
  webAuth.validateChallenge(challenge, accountId, clientDomainId);
} on ChallengeValidationErrorInvalidSourceAccount catch (e) {
  print('Invalid source account in challenge operations');
  // Do not sign this challenge
}
Inheritance

Constructors

ChallengeValidationErrorInvalidSourceAccount(String message)
Creates a ChallengeValidationErrorInvalidSourceAccount with error message.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns a string representation of this instance for debugging.
inherited

Operators

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