1
0
mirror of https://github.com/enpaul/keyosk.git synced 2024-11-24 23:47:49 +00:00

Fix misnamed domain auth enable fields

Add missing refresh expiration parameter to token model
This commit is contained in:
Ethan Paul 2020-02-23 02:00:13 -05:00
parent a21b8dd194
commit 1dd27b6169
2 changed files with 9 additions and 6 deletions

View File

@ -20,10 +20,10 @@ class Domain(KeyoskBaseModel):
purpose purpose
:attribute contact: Contact link for the domain :attribute contact: Contact link for the domain
:attribute enabled: Whether the domain is enabled for authentication :attribute enabled: Whether the domain is enabled for authentication
:attribute enable_password: Whether to allow accounts to authenticate using the :attribute enable_client_set_auth: Whether to allow accounts to authenticate using
client-set authentication secret the client-set authentication secret
:attribute enable_autopassword: Whether to allow accounts to authenticate using the :attribute enable_server_set_auth: Whether to allow accounts to authenticate using
server-set authentication secret the server-set authentication secret
:attribute lifespan_access: Number of seconds that an issued JWT access token should :attribute lifespan_access: Number of seconds that an issued JWT access token should
be valid for be valid for
:attribute lifespan_refresh: Number of seconds an an issued JWT refresh token should :attribute lifespan_refresh: Number of seconds an an issued JWT refresh token should
@ -47,8 +47,8 @@ class Domain(KeyoskBaseModel):
description = peewee.CharField(null=True) description = peewee.CharField(null=True)
contact = peewee.CharField(null=True) contact = peewee.CharField(null=True)
enabled = peewee.BooleanField(null=False) enabled = peewee.BooleanField(null=False)
enable_password = peewee.BooleanField(null=False) enable_client_set_auth = peewee.BooleanField(null=False)
enable_autopassword = peewee.BooleanField(null=False) enable_server_set_auth = peewee.BooleanField(null=False)
enable_refresh = peewee.BooleanField(null=False) enable_refresh = peewee.BooleanField(null=False)
lifespan_access = peewee.IntegerField(null=False) lifespan_access = peewee.IntegerField(null=False)
lifespan_refresh = peewee.IntegerField(null=False) lifespan_refresh = peewee.IntegerField(null=False)

View File

@ -25,6 +25,8 @@ class Token(KeyoskBaseModel):
:attribute revoked: Whether the token has been revoked :attribute revoked: Whether the token has been revoked
:attribute refresh: Refresh token attached to the issued access token; can be :attribute refresh: Refresh token attached to the issued access token; can be
``None`` if refresh tokens are disabled for the domain ``None`` if refresh tokens are disabled for the domain
:attribute refresh_expires: Datetime indicating when the refresh token, if used,
expires
:property claims: Claims generated for the token :property claims: Claims generated for the token
.. note:: Settings and parameters may be changed on linked records. However, the .. note:: Settings and parameters may be changed on linked records. However, the
@ -42,6 +44,7 @@ class Token(KeyoskBaseModel):
expires = peewee.DateTimeField(null=False) expires = peewee.DateTimeField(null=False)
revoked = peewee.BooleanField(null=False) revoked = peewee.BooleanField(null=False)
refresh = peewee.CharField(null=True) refresh = peewee.CharField(null=True)
refresh_expires = peewee.DateTimeField(null=True)
_claims = peewee.CharField(null=False) _claims = peewee.CharField(null=False)
@property @property