Sep45TokenResponse

@Serializable
data class Sep45TokenResponse(val token: String? = null, val error: String? = null)

Response from submitting signed authorization entries.

When the client submits properly signed authorization entries to the authentication server, the server verifies the signatures and returns either a JWT token on success or an error message on failure.

The JWT token can be used to authenticate requests to SEP-6 (Deposit/Withdrawal), SEP-12 (KYC), SEP-24 (Hosted Deposit/Withdrawal), SEP-31 (Cross-Border Payments), and other Stellar services that require authentication.

Example success response JSON:

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Example error response JSON:

{
"error": "Invalid authorization entries"
}

Server-side verification steps:

  1. Decodes authorization entries from base64 XDR

  2. Validates entry structure and arguments

  3. Simulates the transaction to verify contract acceptance

  4. Verifies client signature(s) are valid

  5. Generates and signs JWT token

  6. Returns token in response

See also:

Constructors

Link copied to clipboard
constructor(token: String? = null, error: String? = null)

Properties

Link copied to clipboard

Error message if token submission failed (null on success)

Link copied to clipboard

JWT token string for authenticating subsequent API requests (null on error)