Don't validate on missing public key.

This commit is contained in:
lain 2018-03-11 14:47:37 +01:00
parent a9f78fe8e0
commit 368e085144
3 changed files with 9 additions and 0 deletions

View file

@ -47,6 +47,7 @@ def validate_conn(conn) do
else
e ->
Logger.debug("Could not public key!")
false
end
end

View file

@ -401,6 +401,13 @@ def get("https://niu.moe/users/rye", ["Accept": "application/activity+json"], _)
}}
end
def get("https://mst3k.interlinked.me/users/luciferMysticus", ["Accept": "application/activity+json"], _) do
{:ok, %Response{
status_code: 200,
body: File.read!("test/fixtures/httpoison_mock/lucifermysticus.json")
}}
end
def get("https://mstdn.io/users/mayuutann", ["Accept": "application/activity+json"], _) do
{:ok, %Response{
status_code: 200,

View file

@ -183,6 +183,7 @@ test "this too" do
{"(request-target)", "post /inbox"}
]
}
assert HTTPSignatures.validate_conn(conn)
end
end