Who may reach a route, and what a refused caller is told.
Every route requires a signed-in user unless its route data carries
:public true (BOU-568). A refusal has the shape the user module's
require-authenticated interceptor answers with, so a client sees one 401
whichever layer refused it: the one error body of
wagoe.platform.core.http.errors (BOU-586). No Content-Type: muuntaja encodes a map body
only when none is set (ZZP-120).
Who may reach a route, and what a refused caller is told. Every route requires a signed-in user unless its route data carries `:public true` (BOU-568). A refusal has the shape the user module's `require-authenticated` interceptor answers with, so a client sees one 401 whichever layer refused it: the one error body of `wagoe.platform.core.http.errors` (BOU-586). No Content-Type: muuntaja encodes a map body only when none is set (ZZP-120).
(admin? request)Whether the signed-in user has the global admin role.
Whether the signed-in user has the global admin role.
(correlation-id request fresh)The caller's X-Correlation-ID, or fresh when it sent none.
The caller's X-Correlation-ID, or `fresh` when it sent none.
(error-page-html status message correlation-id)A bare error page, for an app that renders none of its own.
A bare error page, for an app that renders none of its own.
(escape-html s)s safe in HTML text or an attribute.
`s` safe in HTML text or an attribute.
(forbidden-response message _request correlation-id)403 for a signed-in caller who may not do this, as refusal-response
answers. A web page once redirected to the login form, which only sent the
user back here.
403 for a signed-in caller who may not do this, as `refusal-response` answers. A web page once redirected to the login form, which only sent the user back here.
(in-tenant-scope? request)Whether the caller may use the schema the request runs in. With a tenant resolved: a member of it, a user of it, or a platform admin. Without one, the public schema: only a user of no tenant.
Whether the caller may use the schema the request runs in. With a tenant resolved: a member of it, a user of it, or a platform admin. Without one, the public schema: only a user of no tenant.
(platform-admin? user)Whether user is an admin outside any tenant, whom platform-wide pages such
as the audit trail admit. The role may be a string in an older session.
Whether `user` is an admin outside any tenant, whom platform-wide pages such as the audit trail admit. The role may be a string in an older session.
(public? data)Whether Reitit endpoint data opts out of authentication.
Whether Reitit endpoint data opts out of authentication.
(refusal-response status error message correlation-id)status for a signed-in caller who may not do this: the error body, which
the router shows a browser on /web as the app's error page. Not the login
redirect, which would send them back here.
`status` for a signed-in caller who may not do this: the error body, which the router shows a browser on /web as the app's error page. Not the login redirect, which would send them back here.
(same-id? a b)Whether a names the same id as b, a UUID or its string; never for nil a.
Whether `a` names the same id as `b`, a UUID or its string; never for nil `a`.
(tenant-admin? request)Whether the caller is an admin where the request runs. In a tenant: a
platform admin, an admin by membership of it, or an admin user of it; an
admin of another tenant is not one here. Without a tenant, admin?.
Whether the caller is an admin where the request runs. In a tenant: a platform admin, an admin by membership of it, or an admin user of it; an admin of another tenant is not one here. Without a tenant, `admin?`.
(unauthorized-response message request correlation-id)401 for an API caller; a web page sends the browser to the login form, which returns it here afterwards.
401 for an API caller; a web page sends the browser to the login form, which returns it here afterwards.
(web-request? request)Whether request is for a page under /web.
Whether `request` is for a page under /web.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |