AshAuthentication.Oauth2Server.Metadata (ash_authentication_oauth2_server v0.1.0)

Copy Markdown View Source

Builders for the discovery metadata endpoints.

  • protected_resource/1 (RFC 9728) — for the resource server, served at /.well-known/oauth-protected-resource.
  • authorization_server/1 (RFC 8414) — for the authorization server, served at /.well-known/oauth-authorization-server.

Both return plain maps; controllers JSON-encode them.

Summary

Functions

Build the OAuth Authorization Server Metadata document (RFC 8414).

Build the OAuth Protected Resource Metadata document (RFC 9728).

Functions

authorization_server(server)

@spec authorization_server(server :: module()) :: map()

Build the OAuth Authorization Server Metadata document (RFC 8414).

Endpoint paths are derived from the issuer_url so that mounting under a custom prefix works without configuration.

protected_resource(server)

@spec protected_resource(server :: module()) :: map()

Build the OAuth Protected Resource Metadata document (RFC 9728).