Skip to content

Provider links

Greg Bowler edited this page Oct 30, 2026 · 2 revisions

Alongside login and logout, the client can build links to the provider's administration and profile pages. These methods return PSR URI objects; they do not send redirects themselves.

Administration

$adminUri = htmlspecialchars((string)$auth->getAdminUri(), ENT_QUOTES, "UTF-8");
echo "<a href=\"$adminUri\">Open Authwave administration</a>";

getAdminUri() points to /admin/ on the configured provider. It does not grant administrative access. The provider handles its own authentication and permission checks.

Profile

getProfileUri(?Token $token = null) builds a /profile/ URI for the current user. Call it only after checking isLoggedIn(): it reads the in-memory user directly rather than throwing the same deliberate NotLoggedInException as getAuthUser().

The current builder places the user's ID in the d query parameter, where login and logout normally place a deployment ID. It also omits an action message and does not store a newly generated token in the authentication session. The sibling provider's common request handler treats d as a deployment identifier.

These differences mean this helper should not be treated as a complete profile-editing flow with the sibling provider. Check and reconcile the client and provider implementations before using it in an application. Returning from a profile page is also not an automatic refresh of the user data already stored in the client session.


For the callable methods and supporting classes, see the API reference.

Clone this wiki locally