MissingClientDomainSigningKeyException class

Exception thrown when clientDomain is provided without a signing key or delegate.

When using WebAuth.jwtToken, if you provide a clientDomain parameter, you must also provide either a clientDomainAccountKeyPair or a clientDomainSigningDelegate to sign the client_domain ManageData operation that the server adds to the challenge transaction.

Without one of these, the client_domain operation in the challenge will remain unsigned, causing the server to reject the signed challenge with a confusing signature verification error.

Correct usage patterns:

Using local keypair:

await webAuth.jwtToken(
  accountId,
  [userKeyPair],
  clientDomain: 'wallet.example.com',
  clientDomainAccountKeyPair: clientDomainKeyPair,
);

Using external signing delegate:

await webAuth.jwtToken(
  accountId,
  [userKeyPair],
  clientDomain: 'wallet.example.com',
  clientDomainSigningDelegate: (xdr) async {
    return await remoteSigningService.sign(xdr);
  },
);

Incorrect usage (throws this exception):

await webAuth.jwtToken(
  accountId,
  [userKeyPair],
  clientDomain: 'wallet.example.com',
  // Missing both clientDomainAccountKeyPair and clientDomainSigningDelegate
);
Implemented types

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 error message indicating a signing key or delegate is required.
override

Operators

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