authe
This commit is contained in:
parent
a921fb6a0f
commit
309b4c6ba8
15
auth.py
15
auth.py
@ -30,20 +30,13 @@ class PasswordMismatchException(Exception):
|
||||
|
||||
UserEntry = namedtuple('UserEntry', ['id', 'login', 'expiry', 'claims'])
|
||||
|
||||
|
||||
JWT_PRIV_KEY = ""
|
||||
try:
|
||||
JWT_PRIV_KEY = os.environ["JWT_PRIV_KEY"]
|
||||
except KeyError:
|
||||
with open('/opt/app/config/authservice.key', 'r') as f:
|
||||
JWT_PRIV_KEY = f.read()
|
||||
with open('/opt/app/config/authservice.key', 'r') as f:
|
||||
JWT_PRIV_KEY = f.read()
|
||||
|
||||
JWT_PUB_KEY = ""
|
||||
try:
|
||||
JWT_PUB_KEY = os.environ["JWT_PUB_KEY"]
|
||||
except KeyError:
|
||||
with open('/opt/app/config/authservice.pub', 'r') as f:
|
||||
JWT_PUB_KEY = f.read()
|
||||
with open('/opt/app/config/authservice.pub', 'r') as f:
|
||||
JWT_PUB_KEY = f.read()
|
||||
|
||||
|
||||
def getUserEntryFromDB(application: str, login: str):
|
||||
|
@ -25,7 +25,7 @@ paths:
|
||||
post:
|
||||
tags: [ "JWT" ]
|
||||
summary: Accept encrypted set of credentials, return JWT token
|
||||
operationId: auth.generateToken
|
||||
operationId: auth.generateTokenFromEnc
|
||||
requestBody:
|
||||
content:
|
||||
'text/plain':
|
||||
|
Loading…
x
Reference in New Issue
Block a user