WebAuthException

Base exception for all SEP-10 Web Authentication errors.

All exceptions thrown by com.soneso.stellar.sdk.sep.sep10.WebAuth extend this class, allowing client code to catch all SEP-10 errors with a single catch block when needed.

SEP-10 authentication is security-critical. Always handle exceptions appropriately and never silently ignore authentication failures.

Example - Catch all SEP-10 errors:

try {
val webAuth = WebAuth.fromDomain("example.com", Network.PUBLIC)
val token = webAuth.jwtToken(accountId, signers)
} catch (e: WebAuthException) {
// Handle any SEP-10 authentication error
logger.error("Authentication failed: ${e.message}")
}

See also:

Inheritors

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
expect open val message: String?