Skip to main content

Module routes

Module routes 

Source
Expand description

OAuth and session HTTP routes.

These routes are mounted automatically by AtrgApp::run():

  • GET /auth/login?handle=<handle> — initiate OAuth
  • GET /auth/callback — OAuth callback
  • POST /auth/logout — clear session
  • GET /auth/session — current session info (JSON)
  • GET /client-metadata.json — OAuth client metadata
  • GET /.well-known/oauth-protected-resource — OAuth protected resource metadata

Structs§

LoginQuery
Login query parameters.

Functions§

auth_router
Returns a single router containing all atrg built-in auth routes: /auth/*, /client-metadata.json, and /.well-known/oauth-protected-resource.
client_metadata
OAuth client metadata endpoint.
routes
Build the auth router with all authentication routes.
spawn_cleanup_task
Spawn a periodic cleanup task for expired OAuth states and sessions.
well_known
OAuth protected resource metadata endpoint.