Skip to content

[cloud] Make invite_id field in JWT invitations lowercase

Administrator requested to merge milan/fix_invite_ID into main

Created by: kopancek

Description

Making all the fields of the JWT lowercase is the convention. Not sure how we missed this in the original review, but hopefully it will not make any more eyes cry by looking at the decoded JWT anymore :)

How it looks now

{
  "invite_id": 1,
  "sender_id": 0,
  "iss": "http://example.com",
  "sub": "0",
  "exp": 1611964800
}

Notice the shining invite_id now all in lowercase :trollface:

Test plan

See the updated unit test. As a result of changing the field to the lowercase, the resulting base64 encoding of the token changed as well.

Parsing of the JWT is using GoLang native JSON Unmarshal function, which is case insensitive. So this change will not affect reading existing invitation URLs.

Merge request reports

Loading