mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-10 10:03:38 -04:00
add webauthn crud endpoints
added some simple validation to the delete endpoint for sanity, but generally my assumption is that more validation will happen on the admin side. noteably im not checking whether the credentials are duplicated, nor is there a uniqueness constraint in the database - I'm not sure if the credential blob will always reliably be equivalent, and I believe the browser should hopefully take care of dupes.
This commit is contained in:
23
app/webauthn/webauthn_schema.py
Normal file
23
app/webauthn/webauthn_schema.py
Normal file
@@ -0,0 +1,23 @@
|
||||
post_create_webauthn_credential_schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST webauthn_credential schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"credential_data": {"type": "string"},
|
||||
"registration_response": {"type": "string"},
|
||||
},
|
||||
"required": ["name", "credential_data", "registration_response"],
|
||||
"additionalProperties": False
|
||||
}
|
||||
|
||||
post_update_webauthn_credential_schema = {
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"description": "POST update webauthn_credential schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
},
|
||||
"required": ["name"],
|
||||
"additionalProperties": False
|
||||
}
|
||||
Reference in New Issue
Block a user