Made the tokens contain the actual sub

Signed-off-by: Arzumify <jliwin98@danwin1210.de>
This commit is contained in:
Tracker-Friendly 2024-10-02 17:52:47 +01:00
parent 10a48cdd1c
commit 755a600418
1 changed files with 2 additions and 1 deletions

View File

@ -1125,7 +1125,7 @@ func Main(information library.ServiceInitializationInformation) {
} }
openIDTemplate := jwt.MapClaims{ openIDTemplate := jwt.MapClaims{
"sub": userId, "sub": uuid.Must(uuid.FromBytes(userId)).String(),
"iss": hostName, "iss": hostName,
"name": username, "name": username,
"aud": appId, "aud": appId,
@ -1154,6 +1154,7 @@ func Main(information library.ServiceInitializationInformation) {
"nonce": nonce, "nonce": nonce,
"aud": appId, "aud": appId,
"isOpenID": false, "isOpenID": false,
"sub": uuid.Must(uuid.FromBytes(userId)).String(),
} }
accessToken := jwt.NewWithClaims(jwt.SigningMethodEdDSA, accessTokenTemplate) accessToken := jwt.NewWithClaims(jwt.SigningMethodEdDSA, accessTokenTemplate)