add vars and get_user_id in model user
This commit is contained in:
parent
e649d65b5d
commit
3cf87f7f95
|
@ -97,3 +97,9 @@ class DevicehubConfig(Config):
|
||||||
MAIL_DEFAULT_SENDER = config('MAIL_DEFAULT_SENDER', '')
|
MAIL_DEFAULT_SENDER = config('MAIL_DEFAULT_SENDER', '')
|
||||||
API_DLT = config('API_DLT', None)
|
API_DLT = config('API_DLT', None)
|
||||||
API_DLT_TOKEN = config('API_DLT_TOKEN', None)
|
API_DLT_TOKEN = config('API_DLT_TOKEN', None)
|
||||||
|
|
||||||
|
"""Definition of oauth jwt details."""
|
||||||
|
OAUTH2_JWT_ENABLED = config('OAUTH2_JWT_ENABLED', False)
|
||||||
|
OAUTH2_JWT_ISS = config('OAUTH2_JWT_ISS', '')
|
||||||
|
OAUTH2_JWT_KEY = config('OAUTH2_JWT_KEY', None)
|
||||||
|
OAUTH2_JWT_ALG = config('OAUTH2_JWT_ALG', 'HS256')
|
||||||
|
|
|
@ -41,6 +41,9 @@ class User(UserMixin, Thing):
|
||||||
|
|
||||||
# todo set restriction that user has, at least, one active db
|
# todo set restriction that user has, at least, one active db
|
||||||
|
|
||||||
|
def get_user_id(self):
|
||||||
|
return self.id
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, email, password=None, inventories=None, active=True, phantom=False
|
self, email, password=None, inventories=None, active=True, phantom=False
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
Reference in New Issue