Skip to main content

Preface

This article describes an example on how to configure Authlete to generate encrypted ID tokens for a particular client.

Preparing and registering a JWK set

Prepare and register a JWK set to be used for encrypting ID tokens. See the following article for instructions. In this example, the following JWK set is registered.

Configuring ID token encryption

Choose encryption algorithm of ID token for the client. See Client Settings - JWK Set for details. In this example, the following settings in accordance with the registered public key are specified: encrypted-id-token_1 Settings for ID token encryption

Generating an encrypted ID token

With the settings above, Authlete will be encrypting ID tokens for the client, like the following value:

Decrypting the ID token

On receiving the ID token above, the client will be decrypting it using the client’s private key. The following is a sample JWK set for the decryption:
Here is an example using José to decrypt and other commands to extract a payload part: