A client sends a request to an authentication server requesting access to
a service at an application server. The authentication server returns a
token containing an encrypted version of a session key that was encrypted
using a secret shared between the authentication server and the
application server. The client encrypts application data using a
corresponding unencrypted version of the session key and text-encodes
both the encrypted application data and the encrypted version of the
session key. The text-encoded application and text-encoded encrypted
version of the session key are both included in a message and sent to the
application server. The application server decrypts the encrypted version
of the session key using the shared secret so as to reveal the
unencrypted version of the session key. The application server then
decrypts the encrypted application data using the revealed unencrypted
version of the session key.