Below is a Java code sample to create “login_hint” using clientId and clientSecret provided to portal team. The following shows the steps of the code:
- Setup JWS payload data, given_name, family_name, dob, identifier, uuid (for the details, see the specification above).
- Prepare for JWS HMAC SHA-256 signature key and AES-256 JWE encryption key, by using the target portal’s client secret.
- Generate a JWS (HMAC SHA-256 signed with the signature key above).
- Generate a (nested) JWE with the payload of compact-serialized JWS, generated above (AES GCM 256 Direct encryption method, with the encryption key above).
- Use compact-serialized JWT as login_hint.