pub struct ManifestAuthUserConfig {
pub entity: String,
pub expose: Vec<String>,
pub hide: Vec<String>,
pub admin_field: Option<String>,
}Fields§
§entity: StringManifest entity name pylon treats as the User table.
Default "User" — the convention every existing pylon app
already follows.
expose: Vec<String>Optional allowlist of fields exposed via /api/auth/session.
When set, ONLY these fields appear in the response (id is
always included). Useful for apps that want strict schemas.
hide: Vec<String>Additional fields to strip from the User row before responding.
Combined with the framework defaults (passwordHash plus
anything starting with _). Use this for app-specific
secrets stored on the User row.
admin_field: Option<String>Field name on the User row that, when truthy, marks the
session as auth.is_admin = true. Default unset (only the
PYLON_ADMIN_TOKEN env-bearer path grants admin). When set,
resolving a session cookie loads the user, reads this field,
and lifts is_admin if it’s true/1/non-empty.
Apps that want per-user admin (Studio access for specific
User rows instead of a shared bootstrap token) set this to
"isAdmin" (or whichever bool field they store on User).
Pylon-cloud uses this so platform admins sign in with their
regular account and Studio respects the role.
Bootstrap pattern: PYLON_ADMIN_TOKEN keeps working for CI /
fresh deploys with no User rows yet. The two paths are
additive — admin token OR matching admin field both grant
is_admin.
Trait Implementations§
Source§impl Clone for ManifestAuthUserConfig
impl Clone for ManifestAuthUserConfig
Source§fn clone(&self) -> ManifestAuthUserConfig
fn clone(&self) -> ManifestAuthUserConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more