Created
February 8, 2018 10:36
-
-
Save gdchamal/0b52a2788a8b36c0981d953c58a6666c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PublicKey(BaseModel): | |
"""Contact public cryptographic keys model.""" | |
user_id = columns.UUID(primary_key=True) | |
resource_id = columns.UUID(primary_key=True) # clustering key | |
key_id = columns.UUID(primary_key=True) # clustering key | |
resource_type = columns.Text() | |
label = columns.Text() | |
date_insert = columns.DateTime(default=datetime.datetime.now(tz=pytz.utc)) | |
date_update = columns.DateTime() | |
expire_date = columns.DateTime() | |
key = columns.Text() | |
fingerprint = columns.Text() | |
# JWT parameters | |
kty = columns.Text() # rsa / ec | |
use = columns.Text() # sig / enc | |
alg = columns.Text() # algorithm | |
# Elliptic curve public key parameters (rfc7518 6.2.1) | |
crv = columns.Text() | |
x = columns.Integer() | |
y = columns.Integer() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment