Skip to content

Commit

Permalink
Added user to system session
Browse files Browse the repository at this point in the history
  • Loading branch information
z1pti3 committed Dec 27, 2020
1 parent fce9b6a commit 8bfaf30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def generateSession(dataDict):
return jwt.encode(dataDict, sessionPrivateKey.encode(), algorithm="RS256")

def generateSystemSession():
data = { "expiry" : time.time() + 10, "admin" : True, "_id" : 0, "primaryGroup" : 0, "authenticated" : True, "api" : True }
data = { "expiry" : time.time() + 10, "admin" : True, "_id" : 0, "user" : "system", "primaryGroup" : 0, "authenticated" : True, "api" : True }
return jwt.encode(data, sessionPrivateKey.encode(), algorithm="RS256")

def validateSession(sessionToken):
Expand Down

0 comments on commit 8bfaf30

Please sign in to comment.