Display names for BareRTC
This commit is contained in:
parent
2b07b98bb5
commit
0527ff54b5
|
@ -20,6 +20,7 @@ type Claims struct {
|
||||||
IsAdmin bool `json:"op"`
|
IsAdmin bool `json:"op"`
|
||||||
Avatar string `json:"img"`
|
Avatar string `json:"img"`
|
||||||
ProfileURL string `json:"url"`
|
ProfileURL string `json:"url"`
|
||||||
|
Nickname string `json:"nick"`
|
||||||
|
|
||||||
// Standard claims. Notes:
|
// Standard claims. Notes:
|
||||||
// subject = username
|
// subject = username
|
||||||
|
@ -79,6 +80,7 @@ func Landing() http.HandlerFunc {
|
||||||
IsAdmin: currentUser.IsAdmin,
|
IsAdmin: currentUser.IsAdmin,
|
||||||
Avatar: avatar,
|
Avatar: avatar,
|
||||||
ProfileURL: "/u/" + currentUser.Username,
|
ProfileURL: "/u/" + currentUser.Username,
|
||||||
|
Nickname: currentUser.NameOrUsername(),
|
||||||
RegisteredClaims: jwt.RegisteredClaims{
|
RegisteredClaims: jwt.RegisteredClaims{
|
||||||
// TODO: ExpiresAt 60 minutes to work around chat server reliability,
|
// TODO: ExpiresAt 60 minutes to work around chat server reliability,
|
||||||
// should be shorter like 5 minutes.
|
// should be shorter like 5 minutes.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user