The BlueCherry authentication mechanism exposes the bc-token
cookie to the application. The body of this cookie is a JWT (JSON Web Token) and allows the application to retrieve information about the BlueCherry user that accesses the application. Any JWT library can be used to decode the token. After decoding you can retrieve valuable information from the JWT body:
{
"tokenId": "cto8jbrt",
"accountId": "a7769e4e-bc97-4813-a428-3d622c2b8fd7",
"accountTitle": 1,
"accountFirstname": "John",
"accountLastname": "Doe",
"accountRights": [1, 2, 3],
"exp": 1703802609,
"issuer": "BlueCherry",
"iat": 1703197809
}
The most important fields for the application are: