Add IndieAuth support

This commit is contained in:
Thomas Sileo 2022-07-10 11:04:28 +02:00
parent 10676b039a
commit c10a27cc08
14 changed files with 578 additions and 19 deletions

View file

@ -65,6 +65,7 @@ async def verify_signature(
key_id = doc["signature"]["creator"]
key = await _get_public_key(db_session, key_id)
print(key)
to_be_signed = _options_hash(doc) + _doc_hash(doc)
signature = doc["signature"]["signatureValue"]
signer = PKCS1_v1_5.new(key.pubkey or key.privkey) # type: ignore