Expand description
Shared helpers for plugin implementations.
Extracted to avoid duplicating common patterns across plugins (DRY).
Structs§
- Issued
Session - Result of issuing a real session for a user.
- Issued
Session Record - Actual session issuance with retained adapter output for framework callbacks and separately filtered public responses.
- Session
Overrides - Trusted fields for the initial session insert in a custom sign-in flow.
Enums§
- Session
Issue Error - Session issuance failures that callers may need to surface differently from a generic auth error (for example OAuth callback redirects).
Functions§
- admin_
banned_ user_ message - Resolve the configured message shown when a banned user attempts to create a session.
- admin_
plugin_ enabled - Whether the admin plugin is active for this auth instance.
- apply_
default_ role - Apply the configured default admin role to a new user when the caller didn’t set an explicit role.
- delete_
session_ cookie_ headers - TS-style cookie clearing used by
deleteSessionCookie. - expires_
in_ to_ at - Convert an
expiresInvalue (seconds from now) into an RFC 3339expires_attimestamp string. - get_
cookie - Parse a cookie value from the request’s
Cookieheader. - get_
credential_ account - Fetch the user’s credential account, if present.
- get_
credential_ password_ hash - Resolve the user’s stored password hash from the credential account.
- get_
owned_ api_ key - Fetch an API key by ID and verify that it belongs to the given user.
- issue_
user_ session - Issue a session for the given user, applying admin-plugin ban semantics when the admin plugin is enabled.
- issue_
user_ session_ record - Issue and publish genuine retained adapter results.
- issue_
user_ session_ with_ fields - Issue a session with trusted fields applied during its initial insert.
- issue_
user_ session_ with_ fields_ record - Issue a session with trusted initial fields and retain its adapter output.
- issue_
user_ session_ with_ overrides - Issue a replacement session while preserving trusted session extension fields.
- issue_
user_ session_ with_ overrides_ record - Issue replacement records with actual retained output.
- require_
org_ api_ key_ permission - Authorize a user against an organization-owned API key, mirroring
upstream’s
checkOrgApiKeyPermission. - response_
session - Resolve the session selected by a completed response’s signed session cookie.
- user_
has_ password - Whether the user currently has a password set.