AP: Recognize "CryptographicKey" as a type of http sig keys
The examples in the security vocabulary's spec use "Key" but the JSON-LD context doesn't define that term. From now on, just in case, recognizing both "Key" and "CryptographicKey" as indication that the object is a key. zPlus, thanks for finding this bug!
This commit is contained in:
parent
417fcd3e94
commit
55c87b8a54
1 changed files with 2 additions and 2 deletions
|
@ -223,8 +223,8 @@ instance ActivityPub PublicKey where
|
|||
parseObject o = do
|
||||
mtyp <- optional $ o .: "@type" <|> o .: "type"
|
||||
for_ mtyp $ \ t ->
|
||||
when (t /= ("Key" :: Text)) $
|
||||
fail "PublicKey @type isn't Key"
|
||||
unless (t == ("Key" :: Text) || t == "CryptographicKey") $
|
||||
fail "PublicKey @type isn't Key or CryptographicKey"
|
||||
RefURI authority id_ <- o .: "@id" <|> o .: "id"
|
||||
shared <- o .:|? "isShared" .!= False
|
||||
fmap (authority,) $
|
||||
|
|
Loading…
Reference in a new issue