AshAuthentication. Phoenix. Oauth2Server. ProtocolRouter
(ash_authentication_oauth2_server v0.1.0)
Copy Markdown
View Source
Plug router for the client-facing OAuth 2.1 protocol endpoints — anything called by an external OAuth client without a browser session.
Endpoints handled:
GET /oauth-authorization-server— RFC 8414 metadataGET /oauth-protected-resource— RFC 9728 metadataGET /openid-configuration— alias for OIDC-conformant toolingPOST /register— RFC 7591 Dynamic Client RegistrationPOST /token— authorization_code + refresh_token grantsPOST /revoke— RFC 7009 token revocation
Mount this behind your API pipeline (no CSRF, no session needed). For the
human-driven consent step (/authorize), see
AshAuthentication.Phoenix.Oauth2Server.ConsentRouter.
Options
:oauth2_server(required) — the user'sOauth2Serverconfig module
Summary
Functions
Callback implementation for Plug.call/2.
Callback implementation for Plug.init/1.