read_handle
read_handle
Return the conversation id inside a handle. The signature is verified first and the expiry second, both before the id is trusted for anything.
Parameters
handle
A handle this gateway issued, as returned by mint_handle() or the
X-Chat-Handle response header.
Returns
str — the conversation id.
Raises
GatewayRejection, carrying the status the browser should see:
400 malformed handle
The handle is not two base64url parts, or its payload does not decode.
403 invalid handle
The signature does not match, so this gateway did not issue it.
403 expired handle
The handle is past its handle_ttl.
An expired handle is normal rather than exceptional. Every long-lived conversation reaches it eventually, so treat it as “start a new conversation” instead of something to show the visitor.