Display names for BareRTC

face-detect
Noah Petherbridge 2023-04-18 22:19:08 -07:00
parent 2b07b98bb5
commit 0527ff54b5
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ type Claims struct {
IsAdmin bool `json:"op"`
Avatar string `json:"img"`
ProfileURL string `json:"url"`
Nickname string `json:"nick"`
// Standard claims. Notes:
// subject = username
@ -79,6 +80,7 @@ func Landing() http.HandlerFunc {
IsAdmin: currentUser.IsAdmin,
Avatar: avatar,
ProfileURL: "/u/" + currentUser.Username,
Nickname: currentUser.NameOrUsername(),
RegisteredClaims: jwt.RegisteredClaims{
// TODO: ExpiresAt 60 minutes to work around chat server reliability,
// should be shorter like 5 minutes.