PAuS (Padjadjaran Authentication System) OAuth 2.0 integration Following the same pattern as UserAuthGoogle using Assent
Summary
Functions
Make API call to PAuS Can be used in controllers or LiveViews
OAuth callback handler Route: GET /auth/paus/callback
Fetch current PAuS user from session
LiveView on_mount callback for mounting PAuS user
Authorization request handler Route: GET /auth/paus
Sign out from PAuS and clear session Route: GET /auth/paus/logout
Functions
Make API call to PAuS Can be used in controllers or LiveViews
Examples
# GET request
{:ok, profile} = VoileWeb.UserAuthPaus.api(conn, "/user/profile")
# POST request
{:ok, result} = VoileWeb.UserAuthPaus.api(conn, "/user/update", %{name: "New Name"})
OAuth callback handler Route: GET /auth/paus/callback
Fetch current PAuS user from session
LiveView on_mount callback for mounting PAuS user
Authorization request handler Route: GET /auth/paus
Sign out from PAuS and clear session Route: GET /auth/paus/logout