Further openid work

This commit is contained in:
bluepython508
2023-11-11 23:57:09 +00:00
parent 4107d37106
commit aaff151be7
8 changed files with 39 additions and 14 deletions

View File

@@ -0,0 +1,14 @@
defmodule SsoBsnWeb.Webfinger do
use SsoBsnWeb, :controller
plug :put_resp_content_type, "application/jrd+json"
def webfinger(conn, %{ "resource" => <<"acct:", _::bitstring>> = resource_uri }) do
conn |> json(%{
subject: resource_uri,
links: [
%{ rel: "http://openid.net/specs/connect/1.0/issuer", href: url(~p"/") }
]
})
end
end