Web Auth Exception
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}")
}Content copied to clipboard
See also:
ChallengeRequestException for challenge request failures
ChallengeValidationException for challenge validation failures
TokenSubmissionException for token submission failures