1. Store the username un, first name fn, last name ln, user roles rs, user department dt, time when user profile was encrypted in UtcTicks ut (number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight on January 1, 0001), and expiry time te in minutes in a JSON string:
{
"un":"John.Citizen",
"fn":"John",
"ln":"Citizen",
"rs":["Administrator","AlertAdmin","ClientAdmin"],
"dt":"HumanResources,IT",
"ut":637277353891062353,
"te": 30
}
2. Encrypt the JSON string using the AES cryptoalgorithm with a 128-bit key (https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.aescryptoserviceprovider).
3. Use Base64 encoding to encode the array of encrypted bytes.