parse
Parses a JWT token string into an AuthToken.
This method performs lenient parsing: if the JWT is malformed or claims cannot be parsed, it returns an AuthToken with only the raw token string populated. This allows graceful degradation in client applications.
Parsing Behavior
Validates JWT has 3 parts (header.payload.signature)
Handles Base64 URL-safe decoding with automatic padding
Extracts all standard JWT claims (iss, sub, iat, exp, jti)
Extracts SEP-10 specific claims (client_domain)
Returns partial token on any parsing error
Security Note
This parser does NOT verify JWT signatures. SEP-10 clients receive signed tokens from auth servers over HTTPS and use them as bearer tokens. Signature verification is the server's responsibility.
Return
AuthToken with parsed claims, or minimal AuthToken with only token string on error
Parameters
The JWT token string (format: "header.payload.signature")