Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backend/src/logzen/web/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import bottle
import itsdangerous

import random
import os

from logzen.web.api import resource

Expand All @@ -34,7 +34,7 @@ def AuthConfigDecl(config_decl):
with config_decl('auth') as section_decl:
# The secret key used to sign the authentication token
section_decl('key',
default=lambda: random.getrandbits(4096).to_bytes(512, 'little'))
default=lambda: os.urandom(512))

# The duration a authentication token is valid after creation (in
# seconds)
Expand Down