oauth/oidc

This commit is contained in:
bluepython508
2023-11-07 19:35:03 +00:00
parent a0fc306df1
commit 54db8727b0
20 changed files with 670 additions and 3 deletions

View File

@@ -73,4 +73,40 @@ defmodule SsoBsnWeb.Router do
delete "/users/log_out", UserSessionController, :delete
end
# OIDC
scope "/oauth", SsoBsnWeb.Oauth do
pipe_through :api
post "/revoke", RevokeController, :revoke
post "/token", TokenController, :token
post "/introspect", IntrospectController, :introspect
end
scope "/openid", SsoBsnWeb.Openid do
pipe_through :api
get "/userinfo", UserinfoController, :userinfo
post "/userinfo", UserinfoController, :userinfo
get "/jwks", JwksController, :jwks_index
end
scope "/oauth", SsoBsnWeb.Oauth do
pipe_through [:browser, :fetch_current_user]
get "/authorize", AuthorizeController, :authorize
end
scope "/openid", SsoBsnWeb.Openid do
pipe_through [:browser, :fetch_current_user]
get "/authorize", AuthorizeController, :authorize
end
scope "/.well-known", SsoBsnWeb.Openid do
pipe_through :api
get "/openid-configuration", ConfigurationController, :config
end
end