Help us shape the future of Go! Take the 2026 Go Developer Survey

reference

package module
v0.0.0-...-789096f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 90 Imported by: 0

README

Identity reference composition

Optional workload OAuth backend

OAuthWorkload selects a configured confidential Basic client-credentials profile over the real OAuth PostgreSQL owner. Select HTTPOAuthWorkload.Token, Introspect and Revoke independently for canonical HTTPS routes. The normal public graph owns native services, migrations, shared strict HTTP admission, current-authority checks and shutdown; consumers do not implement domain stores or handlers. No human login, OTP, delivery or device bootstrap is selected. See the selected profile and operator walkthrough.

Optional API-key backend

HTTPAPIKey.Update independently selects keyed name/permission replacement through strict password-bearer HTTPS. APIKeys().Update exposes the same native owner with graph startup/tenant/shutdown guards. Current fresh self or explicitly selected organization management authority is mandatory; grants can only narrow, and owner, credential and expiry remain unchanged. Responses contain copied metadata, preserving legacy absent expiry, never a key secret or digest. See the update walkthrough.

Select native APIKey and independently select HTTPAPIKey.Create, Rotate and Revoke for self-owned password-bearer keys. Modern issuance remains the default; explicit APIKey.LegacyConfiguration and ValidateCanonicalKeyID add digest-only legacy import and unchanged bare-key verification. Rotation uses the existing modern issuer. The graph owns the actual session, risk, transaction, migration and secret-custody composition. Disabled operations expose no routes or OpenAPI metadata. See the configuration and consumer walkthrough for initialization, original retries and the supported profile.

APIKey.OrganizationOwned additionally selects the actual Organization owner and forward credential/key-owner migrations. Independently enable HTTPAPIKey.OrganizationOwned for organization create/rotate/revoke over HTTPS. User-only HTTP retains a restricted native view even if direct organization operations are enabled. Creator removal preserves the key but denies that human's management; another authorized owner can rotate/revoke. See the organization-key walkthrough.

An explicit AllowLegacyNoExpiry in the named verify-only legacy configuration preserves imported keys with absent expiry. Verification still requires current authority and original bounded evidence; HTTPS rotation creates a finite modern successor. Default legacy and all modern issuance remain expiry-bound. See the API-key walkthrough.

Independently select HTTPAPIKey.Get/List for strict-bearer stored metadata without enabling mutation routes or secret-rate credentials. APIKeys().Get and .List retain startup, tenant and shutdown guards. Get needs no new schema; select native APIKey.MetadataPaging and apply its owned plan before List. Self and organization paging use separate optional histories, preserving all installed base/legacy/organization prefixes. Reads borrow the existing session/MFA/email/passkey safe limiter, including its emergency budget. Only when none exists supply HTTPAPIKey.StandaloneRate explicitly; competing budgets are rejected. Organization metadata needs both native and HTTP organization selection. Stored grants/status are historical metadata, not current authority; reads expose no secret or digest and never verify/debit a key. See the metadata walkthrough.

Optional organization backend

Organization.TeamRoleBindings additionally selects guarded AssignTeamDynamicRole/RevokeTeamDynamicRole after native team-role and terminal team lifecycle selection. Its separate forward lookup history preserves existing role/team/direct histories. Existing permission HTTP observes actual team grants, revocation and membership/lifecycle changes without impersonating the team.

Organization.DirectRoleBindings selects guarded original-key AssignDynamicRole and natural exact-binding RevokeDynamicRole after native dynamic-role selection and its independent forward lookup migration. Separately select HTTPOrganization.PermissionCheck for current-member exact-epoch allow/deny decisions over strict bearer HTTPS and shared safe rates. Neither selection enables binding mutation HTTP or creates a cached access lease.

Custom roles are explicitly selected with Organization.Core.DynamicRoles and its immutable native permission catalog. Guarded create/get/list/update/delete and effective permission checks retain native current authority. Five independent HTTPOrganization.Role* flags opt into the bearer CRUD/read routes; native selection alone exposes no HTTP. See custom-role composition for original keys, terminal IDs, optional team inheritance and forward histories.

Teams are selected explicitly through Organization.Core.Teams; native APIs remain graph-guarded. Independently opt-in bearer HTTP routes support team creation/listing, rename/deletion and membership. Native lifecycle version1 and its forward migrations are required for rename/deletion; exact reads stay native-only. See team composition and team lifecycle for exact versions, original recovery and separate forward migration history.

Local archive/restore is selected through Organization.Lifecycle and independent HTTPOrganization.Archive/Restore flags. Actual password action proofs and the native original-key lifecycle owner enforce authority; restored organizations never revive terminal grants. See local lifecycle for native discovery, request and forward-migration boundaries. External cascade completion and hard deletion are not claimed.

Invitation expiry is independently selected with HTTPOrganization.InvitationExpire after configuring native registered reasons and applying its owned migration. See expiry for the request, natural-repeat recovery and maintenance boundary.

Ownership transfer is independently selected with Organization.OwnerTransfer and, for HTTP, HTTPOrganization.OwnerTransfer. It composes the existing password-action proof, native atomic role transition and original-key recovery; see configuration and request contract.

HTTPOrganization.InvitationList independently selects current owner-only invitation pages with shared safe rates and explicit limit1..100. The guarded OrganizationInvitationService.List exposes the same native read. See owner invitation listing.

HTTPOrganization.MemberLeave separately selects natural-repeat self-leave with shared safe admission. Guarded OrganizationService.LeaveMember and RecoverOperation preserve current self authority and original metadata after departure; old requests cannot remove readmitted membership. See self-leave and recovery.

Select native Organization and independently select each HTTPOrganization operation for verified-password bearer sessions, durable membership and intended-recipient invitations. See configuration, migrations and the complete consumer journey. Disabled selections expose no organization routes or metadata; native selection alone enables no HTTP.

HTTPOrganization.SlugAvailable separately selects the tenant-local advisory candidate read with the shared safe-rate owner. FeatureSet.Organizations() also exposes its guarded native method. Neither requires membership or reserves a name; current policy/session authority applies and responses contain only a boolean. See the slug walkthrough.

HTTPOrganization.List independently selects current-user organization pages with shared safe rates and an explicit limit1..200 (no default). The same bounded, current-membership/policy-filtered native API is available through OrganizationService.ListOrganizations, retaining graph tenant/drain guards. See listing and continuation.

Optional native passkey backend

Passkey.TOTP selects original UV-passkey plus independent confirmed-TOTP completion through FeatureSet.PasskeyTOTP(), using real native owners and common session read/logout. Native selection enables no new HTTP route. Select HTTPPasskey.MFAContinuation with Signin and independently select HTTPMFA.PasskeyTOTPVerify for explicit challenge-only signin and exact X-MFA-Variant: passkey completion. Without that opt-in, generic signin rejects the native MFA profile. See the profile and lineage limits.

Completed passkey/TOTP sessions can use safe inventory and explicitly selected Passkey.SessionManagement with TOTP:true for a fresh action-bound UV label rename. That selection requires the native TOTP owner and original current factor/session authority; it does not enable MFA key enrollment/removal or another secondary-factor fallback. Native selection adds no HTTP route.

For the HTTP completed-MFA inventory/rename profile, independently select HTTPPasskey.Inventory and HTTPPasskey.SessionUpdate with that native cookie management selection, the original graph CSRF keys and shared rates. Use the completed TOTP session cookie for safe inventory, then a new action-bound UV assertion for the two-phase rename. Original factor authority and metadata-only retries remain native-owned. See the HTTP walkthrough.

Independently set Passkey.SessionEnrollment.TOTP with the selected transport and Passkey.KeyedOptions to add a key from a completed passkey/TOTP session. The existing three-phase API requires fresh action-bound UV, preserves original factor/session and assertion expiry, and returns only metadata on retries. The new key still requires independent MFA at signin. This native selection does not enable HTTP enrollment or MFA key removal.

For HTTP enrollment, independently select HTTPPasskey.SessionEnrollment with that native cookie/TOTP selection and safe inventory. Keep password-proof HTTPPasskey.Registration disabled: the shared registration routes select the three-phase current-session UV workflow explicitly. Original CSRF/Origin, factor authority and retry custody remain mandatory. See the HTTP enrollment profile.

Independently set Passkey.SessionDeletion.TOTP with Passkey.TOTP and Passkey.KeyedOptions for resident-key removal from a completed MFA session. Fresh action-bound UV and another usable key are mandatory. Removal invalidates old sessions; surviving-key signin must complete TOTP before original metadata recovery and read/logout. The ordinary profile remains separate; this selection adds no HTTP route or secondary-factor fallback.

Independently select HTTPPasskey.SessionDeletion with that native cookie/TOTP owner for the existing HTTP delete/recover workflow; password-proof Delete remains disabled. After removal, discard the old session, sign in with the surviving key and complete TOTP before metadata-only recovery and logout. See the HTTP MFA removal profile.

For a passkey-only backend, explicitly select Passkey.Standalone, Passkey.Signup, Session.Passkey and durable PostgreSQL admission. The same sealed construction graph runs with no password, OTP or delivery configuration and zero delivery-worker arguments. Opt-in signup and discoverable-only HTTP compose the genuine registration -> read/logout -> fresh signin journey; HTTPPasskey.DiscoverableOnly rejects identifier-based requests without an email parser. See the standalone deployment profile for exact configuration, owner migrations and excluded mixed/management modes.

HTTPPasskey.Conditional separately selects conditional presentation of discoverable options, including in that standalone graph. The native facade also exposes explicit conditional option methods. Request/ceremony mode, remember choice, expiry and consuming verification remain unchanged; this is backend option generation, not browser UI. See the conditional profile.

StoreConfiguration.Passkey composes the delivered existing-account native enrollment, identified signin, safe inventory and cookie-CSRF session/logout owners. FeatureSet.Passkeys() retains graph startup, tenant and shutdown guards. No passkey HTTP route, named HTTP method or UI is enabled implicitly. See passkey configuration and consumer journey for exact scope, matching keys, selected migrations and the genuine registration-to-passkey test. Identifier-free resident signin is separately enabled by the trusted authentication policy's PasskeyDiscovery; false retains identified-only signin. Both modes use the same guarded passkey session read/logout owner. Passkey.KeyedOptions separately enables native original-key options and metadata-only retry through that handle; it creates no HTTP routes.

Passkey.Signup additionally composes native passkey-first account creation. Supply its distinct identity.passkey.register-verify browser-flow config and protected provider custody keys, leaving their clock/evaluator absent for graph injection. No email or password is required for the new account. The existing deployment's enrollment/signin configuration stays explicit and unchanged. Apply the selected forward migrations, then use PrepareSignupFlow -> IssueSignupFlow -> KeyedSignupOptions (or SignupOptions) -> Signup on FeatureSet.Passkeys(). Only fresh acknowledged commitment reveals bearer/CSRF; retry/recovery returns original metadata, not replacement credentials. Common read/logout requires Session.Passkey; signup itself enables no HTTP route.

Select HTTPPasskey separately for cookie enrollment options/verification, original-flow signin options/verification and safe inventory. Each group is explicit; identifier-free mode additionally requires both HTTP and native risk opt-ins. Common session read/logout remains independently selected. The graph supplies actual native owners, signed device custody, shared rates and exact email comparison policy, not application-written handlers. HTTPPasskey.Signup separately selects passkey-first HTTP signup when native Passkey.Signup, Passkey.KeyedOptions, HTTPPreAuth device custody and Session.Passkey are configured. Begin with POST /v1/session/preauth-issue method passkey-signup, then use the canonical registration pair with explicit mode:"signup" and the original flow/cookies. Enrollment retains its unchanged proof/session variant; failure never selects another branch. See the passkey guide for the closed payloads. Browser UI remains outside this HTTP profile. Independently select Passkey.Management for signed-proof label rename, and HTTPPasskey.Update for its cookie endpoint. Retain original retry custody; the graph appends forward metadata/proof histories without changing signin authority. See the linked passkey guide for the exact configuration and rollout. For current-passkey-session UV rename without a password proof, separately select Passkey.SessionManagement and Passkey.KeyedOptions, then obtain the guarded Passkeys().SessionManagement() handle. It also works with Passkey.Standalone; its native selection exposes no HTTP routes. Explicitly select HTTPPasskey.SessionUpdate for its two-phase cookie endpoint; it is mutually exclusive with password-proof HTTPPasskey.Update. See the passkey guide for the two-phase API. For additional resident keys without password proofs, explicitly select Passkey.SessionEnrollment with Passkey.KeyedOptions and obtain the guarded Passkeys().SessionEnrollment() handle. The graph delegates genuine UV options, compound authorization/registration options and finalization to native owners; it supports the passkey-only deployment and enables no HTTP enrollment profile. See additional enrollment. Select HTTPPasskey.SessionEnrollment independently for the cookie-only three-request registration profile. The graph supplies actual session/CSRF and shared rate owners; no password proof or device cookie supplies enrollment authority. Signup may share the route pair without sharing its flow authority. Select Passkey.Deletion independently for fresh-proof credential removal; it requires this graph's actual configured email/password reset recovery owner, not label management. HTTPPasskey.Delete separately enables its cookie-only endpoint. Removal revokes affected passkey sessions, preserves the original password session for metadata-only retries and returns no replacement secret. For passkey-only removal instead, select Passkey.SessionDeletion with Passkey.KeyedOptions, then obtain Passkeys().SessionDeletion(). The guarded native handle supplies genuine removal UV options, exact completion and current- session metadata recovery. Another usable resident ES256 key must remain; no password/email/OTP fallback is inferred. Install WebAuthn history through migration 6. Native selection enables no delete HTTP route. See resident-key removal. Select HTTPPasskey.SessionDeletion separately for its cookie-only options/completion/recovery endpoint. The graph supplies the same native owner, session/CSRF and shared keyed rate admission, not a password proof or device cookie. It is mutually exclusive with password-proof HTTPPasskey.Delete.

Native secondary-OTP enrollment

StoreConfiguration.MFAOTPEnrollment selects pending OTP enrollment separately from TOTP enrollment, password-origin OTP login and HTTP. Supply configuration, keys, a consuming MFA OTP policy, templates and the existing external sender; the graph composes its actual password-proof, session, risk, OTP, delivery and coordinator owners. Native.Primary and Native.Risk.Evaluation must be absent. Session lookup and CSRF keys must match this graph's genuine current sessions.

After applying the selected owned histories and calling FeatureSet.Initialize, use MFAOTPEnrollment().Enable with fresh purpose-bound primary proof, original session/CSRF and an exact existing verified identifier. The result is pending; only its fresh committed response reveals recovery codes. Destroy that material after explicit delivery. Use MFAOTPEnrollmentConfirmation().OtpSend, run the selected delivery worker, then call OtpVerify with the captured code and original enrollment custody. Confirmation activates the factor but issues no login session. Original recovery returns no replacement codes or new authority.

Password-origin secondary login separately selects PasswordSignin.OTP and HTTPMFA.PasswordOTPSend/PasswordOTPVerify. Its primary returns only a child continuation; final OTP completion issues the usable session. Enrollment and login share OTP's configured resend family: retain its original cooldown rather than resetting it. The graph exposes no enrollment HTTP route implicitly. Retained handles deny before initialization, outside the selected tenant and after Close, including historical recovery. No domain stores, migration SQL or replacement authentication engine are supplied by the application.

Optional anonymous browser workflows

StoreConfiguration.Anonymous composes actual native guest signin/read and optionally deletion/upgrade. It enables no HTTP. The reference graph injects its counted risk and password-proof owners; applications supply configuration, keys and bounded policy callbacks, not domain stores or substitute workflows. FeatureSet.Anonymous() retains selected native operations/recovery under the initialized tenant and shutdown lifetime. Recovery never redelivers credentials. FeatureSet.AnonymousPreAuth() exposes the same guarded native initiation owner for Prepare/Issue and metadata-only Recover, without selecting any HTTP feature or changing the existing OTP/password flow profiles.

HTTPAnonymous independently selects Signin, Read, Deletion and Upgrade. Signin adds the named anonymous method to /v1/session/preauth-issue; Read extends the existing cookie /v1/session/get with explicitly unprivileged guest metadata. The three mutation routes require one Idempotency-Key; upgrade additionally needs both original cookies/synchronizers and a genuine fresh password action proof. See the exact browser contract. Nil selection exposes no routes, metadata, named method or guest read fallback.

Select the same installed session store as password/OTP composition, separate guest/permanent cookie names, matching retained lookup/CSRF keys and the common signed device/exact Origin profile. Anonymous.Validation.Clock and deletion's validation configuration stay absent for graph injection. Upgrade additionally requires password signin/verification and permanent read/signout selection; its primary uses cookie custody, identity.anonymous.upgrade and the target-session audience. The graph injects password verification CSRF keys. The finite upgrade preserves its existing password target and transfers no application resources. Its issuer cookie must match the permanent cookie policy; permanent reading and signout must retain its lookup/CSRF keys. Incompatible selection fails before serving, while retained rotation keys remain supported.

Apply every selected native history through ReferenceMigrationApply before initializing or serving. Anonymous histories append last to the existing kernel, session, password, MFA, capability, risk, audit and outbox predecessors; they do not rewrite installed prefixes. Keep the installed session lineage when adding later profiles. Readiness checks the selected successor constraints as well as the original migration ledgers. Closing the graph cancels/drains active native and HTTP work and permanently denies retained handles.

Explicit abandoned-guest maintenance

Select Anonymous.Cleanup independently of Anonymous.Deletion and HTTP. Supply native anonymouspostgres.CleanupConfig with this graph's exact repository/session/global authority and authorization revision/engine, a fixed trusted service actor, retention evaluator, original keys and bounded batch. Leave Cleanup.Clock nil: the graph supplies its system clock. Construction does not perform cleanup, install history or create a scheduler/HTTP route.

Apply selected forward expiry histories, then initialize and call features.Anonymous() → CleanupExpired. Preserve the random run ID, returned seek cursor and each original recovery query; RecoverCleanup reconciles unknown outcomes without guest credentials or reexecution. Individual subjects, not the batch, are atomic/idempotent commands. Held/deferred subjects remain in observable backlog and are revisited by a later run from zero. Disabled, uninitialized, foreign-tenant and closed-graph handles deny maintenance. TestReferencePostgresAnonymousCleanupWithoutDeletionOrHTTP demonstrates genuine guest issuance, expired/pruned history, cleanup and original recovery. The upgrade-with-cleanup journey also exercises selected successor readiness.

The external-package integration journey is TestReferencePostgresAnonymousUpgradeHTTP: real PostgreSQL bootstrap → target registration/delivered verification/password signin → guest signin/read → fresh target proof → guest upgrade → permanent session read/logout. The companion TestReferencePostgresAnonymousSigninReadDeleteHTTP exercises self-deletion. They supply only declared application policy and external sender/HIBP seams; the graph supplies actual handlers, migrations, transactions and credentials. The deletion journey selects no neighboring atomic-rate HTTP feature, and TestReferencePostgresAnonymousNativeWithoutHTTP proves native initiation, signin, recognition and deletion with no HTTP graph or server selected. Run from this module with a task-owned PostgreSQL 18 fixture using the existing IDENTITY_REFERENCE_POSTGRES_PORT test input:

go test -race -tags=integration -count=1 -run '^TestReferencePostgresAnonymous' .

Agent runs must also set task-owned disposable Go caches and remove the fixture afterward. These journeys are selected-profile proof, not UI, provider delivery, deployment or complete platform/release qualification.

Explicit phone/password recovery

StoreConfiguration.PhonePasswordReset explicitly composes the native recovery owner and original target-bound browser; HTTPPhonePasswordReset separately selects its two POSTs and named phone-reset preauth method. Both native carrier- risk acceptance flags are required. This reference profile requires DurableAdmission, native password/session configuration, OTP custody, delivery and the local keyring. It injects those real owners, independent confirmed-TOTP verification and the same durable counter state—not application stores. An optionally selected email reset must use that same session schema; conflicting combined stores are rejected without changing the email migration history.

The original browser has recovery purpose and zero Remember. HTTP additionally requires HTTPPreAuth with the same signed device/cookie/origin and shared strong HTTP admission. Install/check every selected native migration through the existing reference operator APIs before initialization. Nil selection exposes neither routes nor metadata. A request202 is only an enumeration-safe public acknowledgment; it is not evidence that a recipient exists or delivery committed.

The consuming native workflow owns canonical reset capability, purpose-bound SMS, independent TOTP, distinct risk, HIBP/password replacement and atomic all-session revocation. It never signs in or issues a cookie. Original recovery remains native, code-free and outcome-only. See the selected recovery journey for concrete configuration, original retry and rollback semantics and the real PostgreSQL/HTTPS consumer commands. Selected-profile acceptance does not imply real-provider delivery, complete platform qualification or deployment.

Optional existing-account phone verification

See phone enrollment and consumer journey for native/HTTP selection, fresh password-action proof, encrypted SMS delivery, counted verification and code-free original recovery. Phone signup, signin, reset and replacement are not enabled by this selection. The same guide describes independently selected phone/password and phone SMS-code login, original target-bound initiation and the resulting session read/logout journeys.

Optional delivered email OTP signin

See email OTP composition and consumer journey for native/HTTP selection, actual queued delivery, counted consumption, known-empty MFA fencing, browser/persistent sessions and code-free original outcome recovery.

See magic-link composition and consumer journey for native/HTTP selection, signin-only and optional signup, real queued delivery, scanner-safe explicit consumption, supersession and session/logout through public owners.

Optional username authentication

See username composition and consumer journey for native/HTTP selection, original registration confirmation, migration order, protected rename and explicit unsupported profiles. This is backend composition, not a UI.

Optional email-confirmation hooks

Independently select Email.Change.Native.ChangeHooks for managed change links (including configured TOTP changes), Email.OTPVerification.VerificationHooks for pending-address OTPs, or Email.OTPChange.VerificationHooks for new-address OTP changes including selected first-primary establishment. Nil disables each selection. The existing native transaction still owns identifier, proof, notification and session effects. A success-observer error preserves commit and original recovery while withholding the address; it is not rollback or a reason to submit another logical attempt. Recovery never repeats observers. No route or feature is implicitly enabled by supplying callbacks.

Set PasswordSignup.Native.Verification.Hooks or Email.Verification.Native.VerificationHooks to an immutable email.NewVerificationHooks selection. The graph passes it to the actual native owner; no HTTP middleware, new route or implicit feature is added. Nil is disabled. Change the enclosing native ConfigurationID when callback semantics change and retain original configurations for recovery.

Callbacks receive read-only correlation, not addresses or credentials. Before may reject before reservation. After observes a fresh known commit outside SQL; an error retains verification/recovery but suppresses address projection and following signin. Replay and recovery never retry callbacks. Unknown/rollback do not invoke After. These existing verification fields do not select OTP or email-change callbacks.

Original-browser registration verification and signin

Set PasswordSignup.VerificationSignin to a native passwordpostgres.VerificationSigninConfig with the existing session issuer/CSRF and matching email-grant authority/audience. Keep the signup authorization namespace and selected Session read/logout composition consistent. The graph installs the native email-grant record predecessors and an independent forward verification-signin suffix; existing history/checksums are preserved.

FeatureSet.RegistrationVerificationSignin() provides the guarded native port. Independently set HTTPRegistrationVerification.Signin = true to select the original-browser profile of the existing confirmation route. HTTP signup initiation and signed browser-device custody must also be selected. This registration-only selection rejects ManagedAddresses; default/shared managed confirmation remains verification-only. No extra endpoint is implicitly exposed.

The complete journey is registration, captured delivery, verification, fresh email-possession signin, primary session read and logout. Both original browser and persistent remember choices are retained. Verification commits first; later login denial/ambiguity conserves that known outcome. Replay and metadata recovery never create replacement credentials. The default selection requires known-empty MFA; it does not bypass enrolled factors.

Optional verification-origin TOTP

Set PasswordSignup.VerificationSignin.TOTP to a native MFAChallengeConfig with only totp, the actual capability issuer, encrypted preparation custody, bounded lifetime and attempt budget. Also select PasswordSignup.VerificationTOTP with the completion counter policy, independent comparison key and retained envelope/risk keys. The graph supplies the actual signup browser keys, verification primary and transaction/session owners. Pin PasswordSignup.VerificationSessionLineage once: VerificationBeforeMFA for a verification-only installation (or a fresh verification-first graph), MFABeforeVerification for an installation that already applied native MFA session migrations before verification signin. Keep that migration lineage when selecting other MFA methods later. It describes installed history, not desired factor policy. New verification-TOTP composition rejects an omitted lineage; an incorrect lineage fails compatibility rather than rewriting applied history.

FeatureSet.RegistrationVerificationSignin() then returns Challenge rather than an authenticated session for a genuinely enrolled factor. Preserve its original proof and immutable deadline; complete through FeatureSet.VerificationTOTP() with the original signup browser/pre-auth ID, challenge ID, enrolled factor and actual code. The resulting email-possession MFA session supports the ordinary session read/logout ports. Wrong codes share the original budget; current parent/account/identifier/factor/policy changes deny. A failed or ambiguous child cannot undo committed email verification. Metadata recovery cannot replace lost credentials or restart their deadlines.

HTTP is separately opt-in: HTTPRegistrationVerification.Signin selects confirmation, and HTTPMFA.VerificationTOTPVerify selects completion. Pending confirmation returns signin.challengeRequired, its ID/method/expiry and reveal-once X-MFA-Token, without an authenticated cookie or synchronizer. Send the proof, challenge/factor/pre-auth IDs, code and original callback to POST /v1/mfa/totp-verify with the original browser/device cookies and exactly X-MFA-Variant: verification. Omitting that header never selects this owner. Only successful completion delivers the session cookie and X-CSRF-Token. Native selection alone exposes no route. Secondary OTP, recovery, WebAuthn and trusted-device completion are not selected by this TOTP-only configuration.

TOTP-protected primary-email change

Select Email.TOTPChange, Email.Change and MFAEnrollment.ActiveStepUp.EmailChange with matching proof audience and email.RequirePrimaryAddress. The account must have a genuine verified primary and confirmed TOTP enrollment. The shared graph supplies the original factor proof, session, authorization, transaction, delivery and forward migration owners. Apply the selected migration plan before serving; populated rows are preserved. The source may be a retained password session or a genuine password/TOTP or password/recovery session. Both the source session's original factor and the fresh action proof's factor remain subject to current-authority checks.

Obtain an active-TOTP proof for exactly identity.email.change-request; submit it with the original session and CSRF custody to the keyed change request. Deliver the new-address link through the ordinary sender, validate it without consumption, then explicitly confirm. Promotion, old-address notice and required session effects are atomic. No replacement session or auto-signin is issued. The link cannot outlive original proof age/expiry/session validity; revocation, enrollment or factor-generation changes deny, even with a newer valid login. Exact retries and recovery disclose only original metadata, not fresh secrets.

HTTP is independent: select HTTPMFAActiveStepUp.Purposes containing that exact purpose and HTTPEmailRequests.ChangeRequest/ChangeConfirm. Send the proof ID returned by /v1/mfa/totp-verify with X-MFA-Variant: step-up, then use the email endpoints with the original cookie, CSRF and idempotency key. Native selection alone exposes no route. This profile does not select initial-primary change, new-address OTP, other factor methods, privacy or login.

Administrative email removal is independently opt-in. Set Email.Removal.Primary.AdministrativeTargets for the native owner, and separately HTTPEmailRequests.AdministrativeRemovalTargets with AddressRemove for HTTP. HTTP selection requires native selection. Supply an actual authorizer granting the exact actor/action/tenant/target, not a role string or client override. The actor retains their original fresh password/session/CSRF; both accounts must have authoritative known-empty MFA for this selected profile. Target signin/reset eligibility, token retirement, session invalidation and audited pending cascade admission commit together without changing the actor's session. Empty target preserves self behavior; native selection alone exposes no HTTP capability.

For the runnable PostgreSQL registration/verification/signin/session/logout backend, see BASELINE.md. It is an explicit local profile, not a UI, production deployment or whole-platform release.

Selected native email management

StoreConfiguration.Email independently selects Verification, Change, Addresses, Removal, OTPVerification and OTPChange. FeatureSet.EmailVerification(), EmailChange() and EmailAddresses() expose only their selected native workflows; none enables an HTTP route. An empty selection or missing required authority fails construction. Handles require initialized graph custody and an allowed tenant, and deny after graph shutdown without taking ownership of the supplied PostgreSQL pool.

Primary-email OTP replacement

Select Email.OTPChange with EmailOTPChangeConfiguration alongside actual Email.Change/old-address notice and password-session composition. Its policy is email-change, with its own request-key namespace, retained password-session keys, existing comparison domain and code template. Apply selected migrations and initialize the graph before FeatureSet.EmailOTPChange() calls.

The native journey is the existing keyed fresh-password change request, an independent EmailChangeRequest naming that committed command/candidate, captured code delivery and consuming EmailChangeConfirm. Success replaces one genuine primary, notifies its original old address after confirmation, and invalidates old identifier-bound sessions. RecoverEmailChange observes original metadata under its distinct current disclosure permission without comparison or effects. To establish a first primary for an account with exactly one verified email and no primary, additionally set Email.OTPChangeInitialPrimary = true and select email.PrimaryOrSoleVerifiedAddress on the original change owner. The old verified mailbox and its identifier/verification history stay unchanged; the new address becomes the sole primary with the same notice and session effects. Neither setting alone enables this transition. Default selection remains genuine-primary-only. Stronger-factor and auto-signin variants are not enabled. This native selection alone exposes no HTTP capability. Independently set HTTPEmailOTPChange with HTTPEmailOTPChangeConfiguration to select the three public OTP change routes. Supply exact HTTPS Origin, the existing browser-device policy and policy revision. Native change/notice, session and strong HTTPRate storage are required, not their other HTTP routes. The graph owns limiter shutdown and selected rate migrations. Nil HTTP selection advertises no route or OpenAPI capability. The documented handlers can also be composed directly without the reference server.

Pending-email OTP verification

Select Email.OTPVerification with EmailOTPVerificationConfiguration and call FeatureSet.EmailOTPVerification(). The native graph supplies actual OTP, session, factor-authority, risk, delivery, audit/lifecycle and migration owners. Configure email-verification attempt policy, the existing comparison domain, retained session keys matching the password issuer, explicit freshness, CurrentAttemptKeyVersion, dedicated request-key namespace/intent keys and a selected code template/locale. OTP signin and link HTTP routes are not required; original known-empty factor authority must come from real account creation. Apply the graph's selected migrations, then initialize custody before use.

The consumer journey is registration/verification/password signin, managed pending address addition, independent delivered OTP Send, code completion and verified-address projection. Addition retains its fresh password admission; verification Send does not demand a second password proof. Success invalidates old identifier-bound session authority and issues no replacement session. Known-empty MFA, self-user and pending-nonprimary are explicit scope limits.

Independently select HTTPEmailOTPVerificationConfiguration for the three public OTP routes. Configure exact HTTPS Origin, actual existing browser-device policy and current policy revision. Native email OTP, session and HTTPRate storage are mandatory; their other HTTP routes are not. Nil selection advertises no route/OpenAPI capability. Simultaneous HTTPEmailSignin selects a conflicting Send profile and is rejected, not merged or silently weakened. The selected migration source includes OTP consuming custody even with OTP.Signin=nil; later selecting signin preserves installed shared history. The graph owns limiter shutdown but borrows the primary pool.

Preserve original Send keys and completion recovery metadata. Recovery reports committed/noncommitted/unknown original history under current authorization, without comparing/debiting, returning an address or renewing executable authority. Do not resubmit a completion to recover an uncertain commit.

Set EmailManagementConfiguration.Keyed explicitly for durable request correlation. The corresponding handle's VerificationSendKeyed, VerificationResendKeyed or ChangeRequestKeyed takes the native request plus its original identity.IdempotencyKey. Add/change use empty command/address IDs; resend keeps the exact pending address and leaves command ID empty. The kernel chooses and retains the winning command, and the native owner retains original encrypted authority/intent before execution. Matching retries return original metadata without another message, even when the original proof is spent. Unselected and wrong-profile calls deny; no call falls back to unkeyed work. Request-key query policy uses the graph's policy revision. Existing selected kernel histories already include request-key/preparation support. This native selection does not create request HTTP routes.

The storage-neutral FeatureSet.EmailVerificationRequests() and EmailChangeRequests() ports use the same selected keyed native owners. They accept email-owned requests without a caller-selected command ID. Preserve the original idempotency key, signed password proof, session cookie, synchronizer, callback and candidate on retry; do not replace an uncertain request.

Explicitly select HTTPEmailRequestsConfiguration.VerificationSend, .ChangeRequest and/or .ChangeConfirm for their canonical routes. Request routes require native keyed management and cookie password-proof custody, not the HTTP password-verification route. Configure the trusted HTTPS Origin and current PolicyRevision; confirmation also requires the trusted service ActorID. Change uses new-address possession plus required old-address notice. The graph borrows existing strict rate owners, guards the entire request lifetime including proof reads, and exposes no disabled route or OpenAPI operation. For add/resend confirmation also select ManagedAddresses as described below.

Separately set HTTPRegistrationVerificationConfiguration.ManagedAddresses to accept both signup and managed-add links on the single existing verification route. It requires native Email.Verification and matching issuer audience, signer/resolver, limits, skew, revocation and retained replay custody. Both owners retain their bounded trusted clock policy and independently check current authority. The graph authenticates the original signed profile before choosing one owner; no source failure falls back to the other. False preserves signup-only HTTP behavior. This flag selects no add/resend/read/change/removal route.

Select HTTPEmailAddressesConfiguration.Get and/or .List separately for native reads. To enable administrative targets, select Email.Addresses.AdministrativeAudit with a positive acknowledgement budget within Email.Addresses.Native.MaximumDuration; the graph constructs the existing PostgreSQL audit adapter using its borrowed pool and installed audit migrations. Independently select HTTPEmailAddressesConfiguration.AdministrativeTargets to accept and advertise targetSubjectID. Native-only selection opens no route, and HTTP selection without auditing fails startup. The actual authorizer must grant actor/action/tenant/target; configuration is not a permission. Required audit failure withholds data; self reads remain unchanged. No new store, worker, credential or mutation is introduced.

The default HTTP profile remains cookie-authenticated self reads. Native Email.Addresses and session composition are required, but HTTP session routes are not. Existing HTTP session/MFA-list safe routes lend their actual limiter, including its emergency budget. Leave StandaloneRate nil when borrowing; otherwise provide its explicit bounded fallback recorder, namespace and capacity. Conflicting budgets fail construction. Unselected reads have no route or OpenAPI capability. The selected read profile has no administrative target override, bearer fallback, refresh or mutation.

Management requires selected password verification with its exact email action and audience, known-empty MFA, original current session authority and encrypted delivery. The graph supplies the actual proof, protected counter, risk, template and delivery owners. The provider evaluator and protected counters must use the same immutable risk policy, not independently constructed copies with matching version numbers. Password screening must use that risk revision too. Cookie management uses the existing password verification synchronizer keys; it has no CSRF-free fallback. Address reads separately require explicit canonical-ID and disclosure policy and use the graph's actual authorizer and primary repository.

Add/resend creates a pending address and delivered verification link, not a session. Resend enforces the original committed cooldown and invalidates the predecessor only on commit. Primary change verifies the selected new address, applies the configured session effects and queues the original old-address notice. Native typed recovery retains original metadata without repeating effects or replaying credentials. Apply the selected forward histories with the existing operator migration API before initialization; installed native prefixes are not rewritten. Stronger-factor profiles remain separate unfinished work. Selected local runtime proof does not imply whole-unit qualification.

For safe removal select EmailRemovalConfiguration and call FeatureSet.EmailRemoval(). Actual PasswordVerification, PasswordSignin, complete PasswordReset, session and known-empty MFA authority are required. The graph supplies native proof, risk/counters and key owners. Native config defines reuse, original request custody and complete pending cascade policy. For explicit primary replacement, use the native request's ReplacePrimaryWithVerifiedEmail disposition and ReplacementPrimary with the exact surviving verified address ID and both versions. Promotion commits with removal and does not renew verification age; HTTP exposes the same closed profile. Authority scopes/material limits must be compatible. Retain signed targets on new verification grants; unclassified live history denies removal.

Separately enable HTTPEmailRequestsConfiguration.AddressRemove with trusted HTTPS Origin/current revision for its canonical route/OpenAPI; other request flags may stay false. It borrows the keyed secret limiter and includes original proof reads in graph cancellation/draining, with no authentication issuance. Selected operator migrations install the native forward cascade suffix without rewriting populated baseline history. See the wire example. Pending cascade correlation is not asynchronous consumer closure.

Native password/secondary-OTP login

Select PasswordSigninConfiguration.OTP with PasswordOTPConfiguration and explicitly include "otp" in MFAChallengeConfig.AllowedMethods. The graph supplies the actual password primary, child issuer, original browser, session, OTP codec/store and encrypted delivery owners. Call FeatureSet.PasswordOTP() for native sending, verification and original-command recovery. Its retained handle observes the same startup, tenant and shutdown admission as other features; selecting TOTP alone never enables this handle.

HTTPMFAConfiguration.PasswordOTPVerify separately selects the native password- origin POST /v1/mfa/otp-verify route and closed OpenAPI contract. Supply the existing original-flow/device HTTP graph and verification-rate namespace/key; missing native OTP dependencies fail construction, including recovery-only graphs. It selects no OTP-send/enrollment route or TOTP fallback. The native OtpVerificationRateSource authenticates exact retained input before mutable state, preserves the original signed quota interval and exports zero metadata on conflict, unavailable authority or cancellation. Rate metadata cannot grant factor authority or issue a session. The selected email OTP consumer journey is covered through actual native enrollment/delivery/confirmation, opt-in HTTP send/verify, public session read, replay and factor-authority invalidation. This does not qualify all MFA profiles or the complete reference backend for release.

Select HTTPMFAConfiguration.PasswordOTPSend independently for POST /v1/mfa/otp-send; it borrows the graph's native password/OTP owner and existing delivery-IP/destination limiter. It requires the same original flow/device graph but no verification-rate configuration when sending alone is selected. One unchanged initiating key maps through native request preparation; HTTP never invents a command or chooses a recipient. HTTP 202 reports queued metadata, not provider delivery or an authenticated session. Select verification separately for delivered-code completion. Enrollment remains a distinct public native workflow and is not implicitly exposed by either login route.

Configure a consuming otp.PurposeMFA policy, selected template/locale, request-intent custody, original attempt-key version, protected counter/evidence keys, and stable send/completion configuration IDs. Retained password-flow keys must match the existing OTP store's browser-key versions/material. The OTP issuer reuses that store's lockout/digest key identities rather than creating another startup authority. Construction enables no HTTP route or enrollment.

The public migration plan/apply graph contributes independent OTP factor/send, counter and session suffixes. Existing TOTP/recovery storage predecessors are installed under their original namespaces without enabling those APIs; shared MFA management allocations remain available. FeatureSet.Initialize registers the actual OTP issuer before admitting calls. Real bootstrap/retry and later TOTP selection are covered. The selected enrollment/login/HTTP acceptance below uses supported native services and selected handlers; it is not proof of the complete reference server's account/password/session operational baseline.

NewPasswordOTPLoginSendService composes a concrete password/postgres SigninService selected with MFAChallengeConfig.AllowedMethods = []string{"otp"} and a concrete otp/postgres.MFALoginIssuer. It requires a confirmed OTP factor; pending enrollment, TOTP fallback and an unverified address cannot substitute. Construct its intent custody with NewPasswordOTPLoginSendConfig, then select the actual session/profile, cookie keys, issuer, coordinator, protected risk, counter owner, keyring and exact origins. Change ConfigurationID whenever borrowed policy callbacks or signing semantics change; retain original keys and configuration for recovery.

Install the selected password-primary/continuation, browser, OTP/send-family/ issuance, request preparation, protected counter and delivery histories, including MFALoginSendCounterMigrationSource and OTPLoginSendMigrationSource, and initialize the native OTP issuer. The continuation records its exact committed send/factor together with OTP/delivery effects, without renewing its scope, version or shared attempt budget. Verification restores that source rather than accepting a caller-selected recipient, factor or replacement challenge. OtpSend accepts the actual issued child and original browser cookie, an enrolled factor/channel and a request key. Its caller resource is identity.mfa-continuation with the child ID. RecoverOtpSend instead requires the original command, actor, anonymous browser flow and factor record, with an identity.anonymous-flow caller resource. Recovery requires no proof/cookie and discloses no code.

The original OTP account/destination resend window spans enrollment and login: confirmation or a new child does not refill it. Queue commitment is not provider delivery or factor verification, and never issues a session. Run the actual delivery worker with the configured bounded email/SMS sender. This standalone native sending constructor alone does not select graph features or HTTP routes. NewPasswordOTPLoginCompletionService adds actual verification and atomic session/CSRF issuance. Unknown outcomes, matching replay and recovery withhold credentials; original password freshness, remember policy and factor authority remain bound. Use the selection above for graph-owned native composition; OTP login sending/verification transport is selected as described above; enrollment/confirmation use their supported native public APIs. No enrollment HTTP route is implied. Full reference-server and remaining MFA qualification are separate from this selected consumer proof.

The cross-owner journey is in integration/password. With the documented disposable PostgreSQL fixture and candidate module wiring, run:

go test -race -tags=integration ./integration/password \
  -run '^TestSecondaryOTPPasswordLoginHTTPIntegration$/native-mfa-primary/public-enrollment/public-otp-enrollment$' -count=1

It uses the real password/factor/OTP/session/transaction owners and PostgreSQL strict quotas. Only the declared external email sender captures generated codes; no fixture supplies a fake domain store or issues an invented authentication grant.

Selected native and HTTP disable

Set MFAEnrollmentConfiguration.Disable with RecoveryPathEmail and bounded factor/primary maximum ages, alongside native ActiveStepUp and complete PasswordReset request/completion/HIBP/delivery selection. Leave its Primary, Sessions and Recovery unset: the graph supplies actual native owners and rejects application substitutes. Obtain FeatureSet.MFADisable() after graph startup. One/all targets and original disable-purpose proof require no private SQL query. Fresh one-target results include safe unexpired pending siblings captured in the protected transaction; those siblings and their recovery custody are untouched. All-target retires them and returns an empty remaining set. Retained outcome recovery/replay returns no fresh projections.

Set HTTPMFADisable separately for HTTP with exact native origins and explicit shared-rate namespace/key. Native disable alone selects no route or metadata. Authenticated TOTP HTTP may independently select identity.mfa.disable; neither step-up HTTP nor factor-update HTTP is a mandatory disable dependency. Selected histories append MFA v11 and session disposition v3 without rewriting prefixes. Calls and retained handles obey graph startup/drain/shutdown and exact tenant. Current scope is sole active TOTP plus bounded pending siblings/email recovery; general multi-factor replacement, trusted devices and administrative recovery remain unfinished. The reference acceptance crosses disable and actual emailed password reset/delivery/completion into replacement-password login.

Selected MFA inventory

Set MFAEnrollmentConfiguration.Listing = true for guarded native FeatureSet.MFAListing(). It reuses this graph's actual session reader and policy engine and the TOTP-only PostgreSQL metadata owner; graph startup/tenant/shutdown guards remain effective. Other MFA methods/devices remain outside this profile.

For a graph selecting MFAOTPEnrollment, set its Listing = true to compose the coherent native OTP/TOTP reader instead. The same public handle returns unexpired pending, confirmed and retained revoked metadata plus unused recovery counts. Recipient destinations and credentials are never returned. This remains independent of OTP login, HTTP and factor mutation. If TOTP management is also selected, its safe labels are included; unsupported factor authority fails closed rather than returning a partial inventory.

Set StoreConfiguration.HTTPMFAList = &HTTPMFAListConfiguration{} to select GET /v1/mfa/list when HTTP session routes already exist. Both borrow the exact same safe limiter, including emergency capacity. Without HTTP session routes, provide explicit StandaloneRate namespace, maximum keys and bounded degraded- event callback. Native sessions remain required, HTTP session routes do not. Conflicting simultaneous standalone/session rate ownership is rejected. Selecting listing does not select enrollment, login, step-up or regeneration routes.

Real selected-reference journeys cover empty→enrolled inventory, actual code consumption count10→9, missing-cookie/target-query denial, standalone route selection, corrupt inventory, account blocking and post-read authority loss. These are bounded slice results, not complete MFA/platform release qualification.

Development checkpoint: this module currently includes the PostgreSQL-journaled, TLS Valkey velocity store graph and optional native OTP Send/delivery composition with opt-in single-factor OTP sign-in. An IO-free NewServer now exposes exact health/readiness probes and opt-in original-flow HTTP initiation and selected email OTP Send/signin/recovery over that same graph. Optional PasswordReset composes the native public request/completion/recovery service with graph-owned risk and encrypted delivery; HTTPPasswordReset selects its two routes using the existing signed-device and primary rate owners. The selected PostgreSQL/TLS-Valkey integration journey proves reset delivery, completion, predecessor-session revocation, old-password rejection and usable replacement-password login. Full release and remaining reset failure-path qualification are not complete. Fresh dependency readiness is available for this selected graph; remaining HTTP features and complete identity journeys remain unimplemented. Selected-module migration Check/Plan/Apply and durable native command resume are available as explicit store operations, not automatic startup behavior.

Selected password TOTP completion

Select PasswordSignin.MFA for password-first challenges and PasswordSignin.TOTP for native completion. FeatureSet.PasswordTOTP() returns the composed completion service. Independently select HTTPMFA.PasswordTOTPVerify for its HTTP route and HTTPPasswordSignin for password signin. This does not select magic-link login.

Password signin delivers a pending challenge and reveal-once X-MFA-Token, not a session. Complete it through /v1/mfa/totp-verify with X-MFA-Variant: password and the original flow/device cookies. Successful completion delivers a session cookie and CSRF token only once. Current password and factor authority, original primary expiry and browser binding remain mandatory; neither a challenge nor a replay grants a new session.

The selected real PostgreSQL/TLS-Valkey HTTP journey creates the account and factor through public operations, completes password/TOTP, reads the resulting MFA session and logs out. This is development evidence, not full platform or release qualification.

Selected password recovery-code completion

Select PasswordSignin.MFA.AllowedMethods as []string{"totp", "recovery-code"} and configure PasswordSignin.Recovery with PasswordRecoveryConfiguration. Its retained VerificationKeys must match every live enrollment/recovery-set digest key version; missing or corrupt custody denies. The graph supplies the original password/browser/issuer owners and counted risk policy. No TOTP login completion owner or magic-link login is required by this recovery profile. Enrollment confirmation remains a separate explicit selection.

Apply the selected forward migrations, start the graph, and obtain FeatureSet.PasswordRecovery(). Submit mfa.RecoveryUseRequest with the original continuation proof, flow cookie and opaque recovery code. The native owner shares the original attempt budget and independently compares again under locks before atomically burning the code and creating the session. The existing preparation contract charges abuse-rate quota before output generation; that charge survives a final abort and is never repeated for the same command. Factor/child/session/lifecycle changes roll back together on final failure.

Independently select HTTPMFA.PasswordRecoveryUse for POST /v1/mfa/recovery-use. Its closed body is commandID, preAuthID, continuationID, token, recoveryCode and callbackURL, with the original flow/device cookies and exact Origin. Only fresh committed delivery emits session/CSRF credentials. Retry and code-free RecoverRecoveryUse preserve the outcome without credentials. This profile imposes no additional post-login remediation (recoveryRequired:false); factor-sensitive changes still require their own eligible fresh proof and cannot substitute a recovery login.

The real PostgreSQL/TLS-Valkey journey captures a public enrollment code, completes password-first recovery, reads the session and logs out. It also exercises wrong-code/browser denial, late lifecycle rollback, retained rate quota, exact retry and lost-COMMIT-acknowledgement recovery. This is a local development checkpoint, not full MFA or platform release qualification.

Select primary continuation with MagicLink.Request.MFAContinuation and MagicLink.Consume.MFA, then select native completion with MagicLink.TOTP. MagicLinkTOTPConfiguration supplies bounded completion timing, versioned comparison/envelope custody and durable counters in the graph's risk namespace. Its counter policy must be the graph's exact immutable policy; its risk policy version is independent of the authorization revision. The graph supplies the actual original request issuer, browser keys, session profile and provider evaluator. Apply the selected native migrations before startup; existing histories remain unchanged, and readiness requires current MFA successors.

After graph startup, FeatureSet.MagicLinkTOTP() returns the public mfa.TOTPCompletionService. Submit the original child proof, browser cookie, challenge/factor IDs and opaque TOTP code to TotpVerify. Only a new committed invocation returns reveal-once session/CSRF custody. Wrong codes spend the shared budget once per command; authenticated missing/ineligible factor selections use the same budget after a protected eligibility recheck. Retry and RecoverTotpVerify preserve original outcome without credentials. The original primary and completion policy IDs stay distinct. Unsupported trusted-device requests deny rather than silently degrade.

The native PostgreSQL/TLS-Valkey journey exercises primary HTTP delivery, advanced factor epochs, encrypted factor custody, foreign-browser denial, wrong-code accounting, competing completion, replay/recovery and current MFA session validation. Enrollment remains a pre-existing-authority fixture, not a public enrollment claim. The graph's selected session reader and cookie signout now retain current MFA authority, including CSRF denial, protected lifecycle rollback and terminal recovery. Explicit HTTPMFA.TOTPVerify selection exposes the concrete TOTP completion route with the same native owners. The real HTTP journey proves credential delivery, metadata-only exact retry, session read and logout. This is backend composition, not a UI or a complete platform release.

The selected native TOTP handle also implements TotpVerificationRateSource(context.Context, mfa.TotpVerifyRequest) (identity.UserID, string, time.Duration, error) for consumer-owned HTTP rate composition. Use the existing challenge verification limiter: IP admission first, then this owned source read, subject/challenge admission, and actual TotpVerify. Subject and child come from verified original issuance, never JSON-selected identity or the transport actor. The interval is the original signed lifetime, not remaining expiry; this quota profile requires an integral microsecond interval between one second and five minutes.

An exact authorized committed or denied retry reads original command history before mutable continuation/factor state. Conflicting input, unavailable history or a foreign browser returns no quota metadata. The source read performs no factor decryption, code comparison, native debit, reservation or issuance. It is not completion permission. Expired proofs remain denied; use the existing proof/code-free RecoverTotpVerify for historical reconciliation.

Set StoreConfiguration.HTTPMFA to HTTPMFAConfiguration{TOTPVerify: true, ...} to select POST /v1/mfa/totp-verify. Actor and policy revision match native primary issuance. Select the same verification namespace/key as other flows when sharing their IP/subject budgets. The native TOTP, original pre-auth/device and strict rate graph are required; omitted configuration contributes no route or OpenAPI operation. No enrollment or trusted-device route is implied.

Select native authenticated step-up with MFAEnrollment.ActiveStepUp; the graph supplies the real current-session owner and factor-verification migration. Select StoreConfiguration.HTTPMFAActiveStepUp separately with exact native allowed TrustedOrigins, stable VerificationNamespace and VerificationKey to expose only the X-MFA-Variant: step-up arm of POST /v1/mfa/totp-verify. The body is commandID, factorID, code; the current cookie, Origin and synchronizer are mandatory. Only fresh known commitment reveals proofID for recovery regeneration. Replay/uncertainty never redeliver it. No session, enrollment or login route is selected by this option. Both original session observations and proof freshness remain exclusive, non-renewable deadlines. Recovery regeneration remains separately selected through native MFAEnrollment.Regeneration and MFARecoveryRegeneration(). Select HTTPMFARecoveryRegeneration with exact native allowed TrustedOrigins, stable shared RateNamespace and RateKey to expose POST /v1/mfa/recovery-regenerate. The body is commandID, proofID; the original cookie, Origin and synchronizer are required. Count and freshness come from the native replacement policy, not the request. The graph supplies the committed-only original factor-proof source, native whole-set replacement and atomic session revocation. Selecting this endpoint does not implicitly select the step-up, enrollment or login routes.

Only fresh known commitment returns the complete replacement set. All subject sessions are revoked, so sign in again using an enrolled factor or a new recovery code. Further HTTP attempts with the revoked cookie deny without returning codes. Ambiguous responses retain the original command/outcome without plaintext; use the native RecoverRecoveryRegenerate operation under trusted caller policy to reconcile history. Neither that recovery nor matching native retries redeliver codes. A real PostgreSQL/TLS-Valkey journey proves HTTP step-up, lifecycle rollback, replacement, old-code denial, new-code login/logout, competing requests and lost commit acknowledgement. This is slice evidence, not full platform release proof.

Select pending enrollment separately with StoreConfiguration.MFAEnrollment and HTTPMFAEnrollment. The latter requires the real session, password verification and strict HTTP rate graph, an exact subset of native management origins, and stable rate namespace/key. RecoveryCodes defaults to ten and is bounded to 1..20. It selects only POST /v1/mfa/enable; login is not a dependency of that HTTP selection. Submit the original session cookie, synchronizer, Origin, verification proof ID and unchanged request key. Success creates a pending factor, not a session or active factor. Recovery codes appear only on the fresh known commit. Matching retries cannot retrieve them again.

Native keyed preparation conceals preliminary rejection details as unavailable; a wrong synchronizer can therefore return 503 without creating a factor or consuming the verification proof. Never treat that response as permission to replace request custody or bypass CSRF. Separate URI/confirmation operations remain required and independently selectable below. Password-first MFA login is independently selected through PasswordSignin.MFA and PasswordSignin.TOTP.

Set HTTPMFAEnrollment.ProvisioningURI explicitly to also select POST /v1/mfa/totp-uri. The graph supplies the actual native original-custody quota source and shares secret-operation rate budgets. The source is read-only; it cannot consume revelation, decrypt the factor secret or renew the retained disclosure deadline. The real journey proves HTTP URI delivery and metadata-only replay.

Set HTTPMFAEnrollment.Confirmation with stable VerificationNamespace and VerificationKey to select authenticated activation on the shared POST /v1/mfa/totp-verify route. Use the same verification identity as other flows when sharing their quotas. JSON contains only commandID, factorID and code; X-MFA-Variant: enrollment, the original session cookie, exact Origin and synchronizer are mandatory. Missing/unselected variants never fall back to login. Native source reads do not compare codes or activate; protected execution owns both. Activation/retry returns historical metadata, no session or URI. The real HTTP enrollment journey includes confirmation and retains the original SFA session unchanged. Password-first MFA login is independently selected as described above; activation does not promote the original SFA session.

Reset currently requires the selected OTP/delivery graph and uses one of its configured session schemas. Supply PasswordResetConfiguration.Native with the native password profile, HIBP/password policy, issuer custody, current authorization and explicit bounded callbacks; leave its risk evaluation and request delivery owner/renderer unset so composition supplies the existing owners. After explicit initialization, features.PasswordReset() returns the public workflow port. Calls before initialization, after closure or outside configured tenants deny. HTTP remains independently opt-in and requires the existing HTTPPreAuth.Device and HTTPRate selections. Disabled reset HTTP exports neither routes nor operation metadata.

The native reset integration uses the owned observed HIBP checker and signal provider with the native PostgreSQL audit adapter, with only fixed-endpoint HTTPS response IO substituted by synthetic fixtures. It proves prefix-only padded requests and denial before protected effects for breaches, malformed responses, outages and redirects; a zero-count padding row permits the clean replacement. Replay performs no additional provider request. Select Native.CollectReset with Native.Screening.Collect nil for attributed screening. Its original binding and authenticated issuer challenge supply audit identity without transport reconstruction or a fabricated attempt. Required query/match/rejection records are checked in native storage. Synthetic lost acknowledgement denies even a clean candidate; unchanged records reconcile idempotently without screening again. This is consumer integration evidence, not live provider interoperability, real audit transport-disconnect qualification or a durable audit-outage backlog. A host selecting a different failure policy must retain original records through the existing audit protocol, not invent a second identity journal or silently accept undelivered required events.

PasswordSignin independently selects the native password login/recovery port, available as features.PasswordSignin(). Supply PasswordSigninConfiguration.Native with the native verifier, signing/flow/session keys and exact password original- flow profile; leave Native.Risk.Evaluation zero for graph-owned counted risk. Query/admission policy and revision must match this graph's authorization owner. The current composition requires OTP's selected consuming session storage base, but does not authenticate using OTP or accept its different original-flow action. Startup, tenant and shutdown guards apply equally to login and recovery. No password signin route is implicitly enabled. Native password material has one independent migration history shared with reset; selected signin additionally installs the native session-issuance purpose extension without rewriting either workflow's existing history. The native integration journey authenticates an existing session before reset and denies that same bearer afterward, then proves replacement-password login through real selected HTTP initiation and signin. The preexisting account/factor fixture remains explicit; this does not prove registration or full release qualification.

Select PasswordSignin.PreAuth to compose the native original password-flow issuer, using an exact retained Native.FlowKeys index and the signin owner's action, policy and revision. Its public port is features.PasswordPreAuth(); it does not change OTP initiation or implicitly select HTTP. Select HTTPPasswordSignin separately, with the matching service actor/revision and the shared HTTPPreAuth.Device/HTTPRate selections. POST /v1/session/preauth-issue with {"method":"password"} to receive an original flow and secure cookie, then POST /v1/password/signin with flowID, identifier, password and the exact callbackURL, carrying the original flow and device cookies. Optional remember must match initiation. Omitted method retains OTP; an OTP original flow cannot authenticate password login. Both profiles share original-flow rate admission and secure cookie policy. Successful signin delivers the session cookie and X-CSRF-Token, never JSON credentials. Replay cannot reveal either again. Reset and signin coexist as one canonical password-owner contribution. Disabled password HTTP exports neither signin nor the password method in initiation metadata. The current reference profile still requires OTP's storage/device graph; independent password-only composition remains an end-state obligation.

PasswordSignup independently selects required-email-verification registration and its native confirmation/recovery owner. Configure immutable native field, address, registration, password/HIBP and authorization policies, then supply the paired issuer/preparation configuration and protected counter configuration. Leave native evaluator, issuer/codec/counters and delivery owner/renderer absent: the graph constructs these actual owners together. Native.AuthorizationNamespace must match OTP's consuming user-policy namespace; the new account acquires its epoch in the registration transaction. Missing or mismatched selection fails construction rather than creating an account that cannot log in. The graph exports features.PasswordSignup() and features.RegistrationVerification() only after explicit selection, with initialization, tenant and shutdown guards.

Session independently selects primary session reads, self-signout and command recovery through features.Sessions(). Supply its native authority profile, repository, explicit clock/policy/transaction bounds and retained lookup keys. Native.Validation.Clock must be absent: the graph uses Native.Execution.Clock for reads and protected revocation. The explicit verified profile, selected OTP signin and optional magic-link consumption share one kind-dispatched primary reader and the same transactional logout selection, without fallback. Every selected consuming issuer must match deployment, policy namespace, audience, repository and cookie deletion tuple. Retained lookup keys must contain each issuer's exact current version and material; historical rotation keys may remain. Nonempty CSRFKeys selects strict cookie logout and must include each selected consuming issuer's exact current CSRF key; an empty slice disables cookie logout rather than enabling a legacy bypass. Request-only magic-link selection grants no session authority. This composition does not enable anonymous or organization session authority. MFA requires its explicit consuming issuer selection. Session.Passkey additionally opts the configured native passkey issuer into the same common read/logout owner, including independently selected HTTP session routes; it defaults to false.

MagicLink selects native request and optional explicit consumption. Supply versioned issuer/custody keys, address normalization, exact trusted origins and callbacks, original browser-flow keys, delivery template/endpoint and bounded policy configuration. Leave request risk evaluation and delivery owner/renderer unset: the graph injects its counted risk evaluator and encrypted delivery owner. PreAuth selects original flow issuance; HTTPMagicLink independently opts into request/consume routes and requires the shared HTTP rate/device graph. The named magic-link method on /v1/session/preauth-issue creates original intent. Email delivery carries the bearer in a URL fragment; the landing page belongs to the consumer, not this backend. Only explicit POST consumption can log in.

The current reference journey uses a publicly registered, verified account without enrolled MFA. It proves request, encrypted delivery, scanner/foreign- browser denial, one-use login, session read and transactional cookie logout, including rollback/recovery. Retry cannot disclose credentials again. Resend, supersession and optional signup/MFA continuation are still under development; do not treat this existing-account journey as complete magic-link parity.

Native TOTP completion is being composed with protected provider custody and the real command-owned counter adapter, not Authentication-lane admission or a fabricated session. Submitted code/browser intent remains the journal identity; counter preparation is separate. Provider facts enter the existing encrypted session preparation output and retain original expiry on restore. This path is not selected by the graph or HTTP yet: primary MFA challenge branching and a positive public-path PostgreSQL journey remain required before enablement.

PasswordVerification selects native reauthentication through features.PasswordVerification() and, when retained CSRFKeys are supplied, features.CookiePasswordVerification(). It requires selected password signin and primary sessions with matching authority, repository and current issuer keys. Leave native risk evaluation and verifier clock absent: the graph supplies its counted risk owner and the selected session authority clock. Configure exact purpose/action/audience targets and native signing-key retention explicitly. Verification issues only the native bounded proof; it does not extend sessions or consume that proof. Historical recovery does not redeliver it.

PasswordChange selects the native keyed replacement and recovery ports through features.PasswordChange() and, with verification's retained CSRF keys, features.CookiePasswordChange(). Supply native screening/session-disposition policy, the kernel-constructed keyed profile and protected counter configuration in the graph's risk namespace; leave Native.Counters and screening clock absent. The graph requires the native local envelope keyring and constructs the existing protected owner, never an unkeyed fallback. Native defaults revoke all sessions; preservation requires explicit policy. Original proof consumption, credential replacement and session effects stay in the sole native transaction. Existing reset and signin migrations remain unchanged; change adds native counter preparation and session-effect/continuation suffixes. Provider screening defers only command-owned velocity to those mandatory protected counters. These native selections do not implicitly expose routes.

Select HTTPPasswordVerification and HTTPPasswordChange independently to expose POST /v1/password/verify and /v1/password/change. Each uses an explicit cookie or bearer transport, stable rate namespace and dedicated rate key. Cookie selection requires exact HTTPS trusted origins and native CSRF custody; bearer selection forbids origins and never borrows cookies. Verification also requires the selected original browser-device owner. Verification returns a bounded original proof; change accepts its proofID, newPassword and required Idempotency-Key. Neither route returns password hashes or replacement session credentials. Required graph authority and shutdown/drain guards cover primary readers as well as the protected mutation. Revocation denies HTTP retries using the old session; authorized native recovery can disclose the original outcome without reauthenticating that session or redelivering credentials.

The real PostgreSQL/TLS-Valkey reference journey exercises registration, delivered email proof, confirmation, login, reauthentication, protected change, downstream rollback, original-session revocation and old/new-password login. Provider network responses remain controlled fixtures; release qualification and the remaining identity-platform workflows are outstanding.

Select HTTPSession separately to expose GET /v1/session/get and POST /v1/session/signout. Configure one explicit cookie or bearer transport; cookie mode requires exact HTTPS trusted origins, while bearer mode forbids them and never uses ambient cookies. Supply a deployment-scoped rate namespace, bounded emergency capacity and a synchronous bounded degradation recorder. Both routes share one native safe-rate budget. Cookie logout sends strict JSON {} and the signin-delivered X-CSRF-Token under the trusted Origin. Only confirmed success clears transport; failed or ambiguous mutation does not retry automatically. An inactive/absent session yields neutral logout. Selected session routes and original-flow initiation form one contribution, preserving device custody and named signup/password methods. Disabled session HTTP contributes no read/logout routes or metadata. Native and HTTP work deny after graph closure; in-flight native HTTP calls join cancellation and drain.

Select PasswordSignup.PreAuth, HTTPPasswordSignup, shared HTTPPreAuth and HTTPRate to expose signup initiation. POST /v1/session/preauth-issue with {"method":"signup"}, then /v1/password/signup with flowID, email, password and the original exact callbackURL, carrying the returned cookies and an Idempotency-Key. Signup returns a neutral verification acknowledgement, not an account ID or session. The configured worker sends the encrypted native verification delivery. Identical keyed retry retains original effects; changing the original input conflicts. Occupied-address acknowledgement does not replace credentials, issue another grant or reset authorization authority.

Select HTTPRegistrationVerification separately for /v1/email/verification-confirm. Supply the delivered token, original exact callback and a stable canonical commandID under the configured HTTPS Origin. Confirmation atomically verifies the original address and consumes its proof; it issues no session. Exact replay returns metadata, not the address again. Failed protected attempts remain charged, while domain changes roll back; proven abort terminally retires the grant rather than resetting it for reuse. Typed recovery is available through the public native ports; no HTTP recovery route is implicitly added. After confirmation, use the independently selected password initiation/signin route described above.

Apply selected-owner migrations for registration, verification and protected counter extensions alongside the shared kernel, password, factor, capability, delivery and authorization histories. Existing history bytes remain unchanged. The native integration journey creates accounts and original flows through public HTTP and actual migrations, then proves captured delivery, confirmation, login, denial and rollback. Historical velocity warmup remains an explicit test fixture, not proof of fresh velocity bootstrap or full release qualification.

Use selected-owner Check/Plan/Apply for reset installation, rather than only the legacy shared MigrationSource(). Independent native histories install kernel replacement/reset effects, password material, factor authority, capability provenance and session reset effects without changing the installed shared prefix. HTTP completion additionally selects native atomic rate receipts. Pending kernel prerequisites must be explicitly selected; installed compatible prerequisites are reused. Existing accounts are not implicitly assigned empty factor authority: unreconciled authority continues to fail closed.

Quick start

Supply a caller-owned go-postgres pool and one VelocityStoreConfiguration, then construct the sealed graph:

func compose(pool *postgres.Pool, velocity reference.VelocityStoreConfiguration) (reference.StoreSet, error) {
    return reference.ComposeStores(
        reference.StoreConfiguration{Velocity: velocity},
        reference.ReferenceDependencies{PostgreSQL: pool},
    )
}

The named modules are github.com/faustbrian/go-postgres and github.com/faustbrian/go-identity/reference. Configuration selects the schema, unique tenant allowlist, positive primary/recovery timeouts, a lease at most one minute, batch (1–1000; reference 100) and maximum records (1–100000). Recovery timeout must be less than the lease. Native selects the deployment namespace, stable replay secret, risk policy, complete retained digest-key history, canonical rediss://DNS:port endpoint, TLS name/preferences, explicit PEM trust, opaque copied credential, bounded native timeout/pool and standalone topology. The primary receives those exact namespace/secret/policy/key values internally.

Construction performs no network IO or migration. Explicitly install the returned MigrationSource() using the existing go-migrations/v3 PostgreSQL backend and runner before recovery. No private SQL runner or copied migration history is provided. Kernel versions remain 1–9; reference velocity uses the permanent allocation 1000–1011. Do not silently adopt a differently allocated existing ledger. Prefer the explicit Check/Plan/Apply operations below for complete selected-owner migration coordination.

Call stores.RecoverVelocity(ctx, tenant) explicitly. It returns no counter store until the actual primary journal has a full hour of coverage, all original terminal records are restored and acknowledged, and the exact native publication is confirmed and activated by the primary. A fresh empty journal is not healthy. After genuine warmup, another explicit recovery can establish the covered cut. There is no automatic polling, health renewal or hidden retry.

Use the returned risk.CounterStore with risk.NewCounterCoordinator; the owned store records durable intent before its single native mutation and retains the original outcome through that exact primary receipt. Retain a known committed result even if a later error denies positive admission. Pending or unknown outcomes never permit redispatch.

Call stores.Close(ctx) to cancel and join recovery and close owned native connections. Close the caller-owned primary pool separately, after its users have finished. No handler, health/readiness endpoint or background worker is created by this development slice.

Successful recovery also retains that exact counter owner for the forthcoming feature-composition path. Its internal deferred connection rejects requests before recovery, during a new recovery generation and after shutdown. A failed new generation cannot fall back to the previous activation. Routing adds no retry or renewal and preserves the native owner's original outcome declaration. The optional OTP profile uses this connection internally; it does not accept a caller-written risk evaluator or counter store.

Optional OTP Send composition

Optional HTTP rate storage

StoreConfiguration.HTTPRate selects one native strict PostgreSQL backend and the HTTP owner's fixed authentication/delivery policies. Supply a namespace, nonzero 32-byte identifier key and explicit duration bounds: each of maximum duration, timeout, lock timeout and rollback timeout is 1ms–2s; timeout must not exceed maximum duration, and lock/rollback must not exceed timeout. Configure the caller pool with search_path=public: the native adapter owns unqualified SQL and cannot safely share an ambiguous search path. Callbacks that change connection search paths violate this deployment requirement.

Construction freezes configuration without database IO or schema installation. Check/Plan/Apply includes the native version-one migration in the independent identity_http_rate history; MigrationSource()'s existing shared prefix is unchanged. Nil selects neither the backend nor its migration. Graph shutdown permanently denies later admission but leaves the caller pool owned by the caller. This prerequisite does not by itself prove HTTP readiness or a complete browser-login journey.

Selected server construction

After ComposeStores, ComposeProviders, ComposeWorkers and ComposeFeatures, call NewServer(config, dependencies, features) with the same caller-owned PostgreSQL pool. Construction performs no IO, callbacks, migrations, startup or goroutine creation. Supply the exact complete upstream identity.PolicySet: authorization must be the same comparable service handle bound into the graph, and all four identity callbacks are required. No member is replaced or defaulted. For noncomparable service implementations, supply a pointer handle consistently to both configuration stages.

The current profile accepts only PostgresWithValkey, explicit transport limits/hosts, a non-nil bounded tenant resolver, and disabled bootstrap and startup migration application. Migration lock timeout is 1ms–5m and command retention 1h–87600h; worker concurrency is 1–1024, lease/drain bounds 1s–1h. Enabled provider entries are rejected until their native selection is composed, rather than silently omitted. The required PostgreSQL-only deployment profile and complete worker/server lifecycle remain future implementation work.

StoreConfiguration.HTTPPreAuth opts into /v1/session/preauth-issue and its OpenAPI operation. It requires selected OTP original-flow issuance and HTTPRate; nil contributes neither route nor metadata. Supply the shared eventual-session lifetime policy; optional browser-device configuration selects the existing non-authenticating correlation codec. Native issuer configuration owns origin, cookie, callback, action and policy. No application handler, rate backend or domain-store override is accepted. Selected HTTP initiation requires the canonical five-minute OTP.PreAuth.FlowTTL; other lifetimes are rejected during composition, before rate admission or native preparation. Direct native issuance retains its existing 1–10-minute profile.

StoreConfiguration.HTTPEmailSignin selects /v1/otp/send, /v1/otp/signin and /v1/otp/signin/recover with their native OpenAPI operations. Nil exposes none of these routes or metadata. Selection requires OTP.Signin, HTTPPreAuth with its dedicated browser-device profile, and HTTPRate. Supply email-owned address normalization plus trusted actor, policy revision and target. Send and signin query policies must share the same authorization handle and revision; the native issuer owns session cookie and audience. Network JSON limits must admit at least 44 fields, including digest array elements in the recovery envelope, and nesting depth at least 3; smaller limits fail construction. Use explicit bounded body and decoded sizes. No application handlers, stores or workflow callbacks supply these operations. Recovery returns the historical committed outcome, never another session cookie or CSRF credential. The selected HTTPS integration exercises initiation, Send/replay, native delivery, consuming signin and recovery against PostgreSQL and TLS Valkey; it is not full-platform or positive-readiness evidence.

The tenant resolver runs synchronously with a bounded request context after trusted network resolution and before a workflow. Its nonempty result must equal the tenant bound to the exact configured host; errors, panics, cancellation, missing tenants and conflicts deny without credentials or raw callback errors. Resolvers must honor cancellation and be concurrency-safe. The router freezes host policy and OpenAPI metadata at construction.

Handler() returns the owned standard-library handler. OpenAPI() exposes detached native document snapshots. Only GET /healthz and GET /readyz are probes; no /v1 aliases exist. Health is process liveness, not store readiness. Readiness denies before initialization, during recovery and after closure. Each bounded observation checks every selected native migration owner and the current original PostgreSQL journal/TLS Valkey custody for every configured tenant. Missing or incompatible schema, unavailable stores and expired ownership deny. Probes do not debit counters, repair state, renew leases or refresh evidence. A successful probe is a momentary observation of this selected graph, not permission to bypass credential checks or proof of full-platform readiness. Healthy velocity recovery requires historical coverage of the maximum configured window; a fresh journal cannot skip that warmup. Recovery remains explicit when original ownership expires. Readiness does not run it automatically. Initialize features and deploy migrations explicitly; graph closure prevents later workflow admission without taking ownership of the caller pool. This constructor is not a completed login/reference-server milestone.

OTP and delivery selection

Select both StoreConfiguration.OTP and StoreConfiguration.Delivery, with deployment envelope keys and a bounded sender in ReferenceDependencies. The delivery profile must enable state tracking and use production policies. Risk uses the velocity graph's exact policy and retained keys. This checkpoint supports velocity-only admission: required unsupported signals fail composition rather than receiving permissive stand-ins.

Compose in order with ComposeProviders(stores), ComposeWorkers(stores, providers, workerConfigs...), then ComposeFeatures(stores, providers, workers). These stages perform no network IO and start no goroutines. Every selected tenant needs a real delivery worker for the selected OTP provider version. All handles share the store lifetime; foreign, reused or incomplete graphs are rejected. All workers share the strictest retained sender-concurrency ceiling before claiming. Dedicate the sender instance to this graph; unrelated graphs or direct callers require their own shared capacity control.

Select OTP.Signin with the native otp/postgres.SigninConfig to enable features.OTPSignin(). Nil leaves the handle unavailable and contributes no consuming migrations. Sign-in uses the existing Send owner, selected tenant allowlist and store lifetime; it is unavailable before features.Initialize and after store shutdown. No route, worker or listener is started implicitly. The sign-in profile must use the same global authority and user policy namespace as Send and requires its pre-auth session configuration. Its bounded policy must authoritatively deny single-factor issuance when MFA is required; this profile does not implement MFA continuation.

Use the public otp.SigninService with original Send possession and challenge code. Successful new commitment returns the session credential and CSRF token once. Preserve its recovery handle for RecoverSignin, including ambiguous outcomes; recovery returns original history without redelivering credentials. The native adapter owns atomic challenge/pre-auth consumption, session issuance, audit and lifecycle effects. Consumers supply configuration and bounded policy, not domain workflow callbacks or stores.

Selected OTP signin also exposes features.OTPSigninSource() for code-free original identifier discovery through that same native owner. Supply original Send/pre-auth possession and trusted caller; current primary policy and recipient are checked without an attempt debit or session effect. Use the sensitive projection only for trusted transport rate admission, never client output or login authority. Startup, tenant and shutdown guards apply to retained readers.

Select OTP.PreAuth to obtain features.PreAuth() for original flow initiation. Its fixed deployment origin/callback/service actor and retained cookie key version are explicit configuration; action, policy and native namespace are derived from the same OTP owner. Resolve the shared session.RememberPolicy before Prepare(ctx, input), retain the preparation's unchanged Command, then call Issue. Only a fresh successful commitment delivers a reveal-once token and credential-free secure cookie metadata. Recovery returns historical outcome, never another token or renewed lifetime. The graph must be initialized; unknown tenants and closed graphs deny. No SQL, workflow callback or HTTP route is consumer-owned. Nil leaves initiation absent. Compose transport separately.

The integration suite composes this selected handle with the public http/session.NewPreAuthFeature and http.NewRouter over real HTTPS. It checks original committed PostgreSQL flow identity/timestamps, secure cookie custody, startup/shutdown denial, and independently constructed HTTP owners sharing a strict PostgreSQL IP budget. Its rate-schema installation and owner selector are test fixtures, not a production reference constructor or migration contributor. Final NewServer composition and the complete OTP browser login journey remain pending.

Initiation adds the owner-produced version 1420 to the permanently named native identity_preauth ledger, not the shared MigrationSource. Install through the existing reference Check/Plan/Apply APIs selecting identity/session/postgres after its shared prerequisites. The existing native global command/lock owner coordinates both histories. This permits later sign-in selection without an earlier pending gap. Module numeric versions summarize maxima; only compatible status proves every participating history is complete. Plan step FromVersion belongs to its SourceDigest history. Existing deployment histories are unchanged.

StoreSet.MigrationSource() preserves kernel 1–9 and risk 1000–1011 exactly. Selecting OTP/delivery appends owner-produced kernel 1012–1018, OTP 1100–1103, pre-auth session 1200–1201, distinct authenticated session 1210, delivery 1250–1254 and authorization authority 1300. Selected delivery cancellation uses 1255, receipt metadata uses 1256, authenticated receipt commands use 1257, and reconciliation uses 1258–1260. Receipt metadata is included whenever receipt tracking, authenticated receipts or reconciliation needs it; unselected extensions remain absent. Consuming sign-in appends OTP 1400 and session 1411–1416, with 1410 only for a distinct sign-in session schema. Existing Send-only histories remain unchanged. Shared session schemas reuse one base; OTP, session and risk owners must otherwise use distinct schemas. Unselected profiles contribute no schema. These are new permanent reference allocations, not changes to applied history. Keep the selected schemas, global authority and OTP.BootstrapTenantIDs unchanged after apply; later tenant onboarding uses owned lifecycle APIs. Bootstrap tenants are copied explicitly and are not inferred from velocity scopes. An empty set grants no bootstrap tenant authority.

stores.ReferenceMigrationCheck(ctx, ReferenceMigrationCheckRequest{Modules: []ModuleID{"identity/postgres", "identity/risk/postgres"}}) performs bounded read-only discovery. It never prepares a ledger or acquires apply ownership. Statuses contain current/required versions and compatible, required, dirty or incompatible state. Only selected canonical IDs are accepted; caller current versions are forbidden. Each requested owner's complete physical history is validated. Missing records with owned objects, including empty schemas, are unmanaged/incompatible rather than permission to baseline them.

Selected OTP/delivery also includes identity/otp/postgres, identity/session/postgres, identity/delivery/postgres, authorization/postgres, audit/postgres, outbox/postgres and outbox/postgres/identity. The last three retain their original independent histories in native namespaces audit, outbox and identity_outbox (public.golib_migrations_<namespace>). Audit fresh-role preflight must share its history's native InstallFresh transaction; existing role collisions are not ownership proof or permission for adoption.

stores.ReferenceMigrationPlan(ctx, ReferenceMigrationPlanRequest{Modules: []ModuleID{"identity/postgres", "identity/risk/postgres"}}) returns a detached canonical plan without writes or apply locks. Modules contain sorted current versions; steps retain native order and owner-local previous versions. A valid zero-step plan has a nonzero digest; any error returns no usable plan. Pending prerequisites must be explicitly selected, while completed prerequisites need not be selected. In particular, the interleaved shared kernel/risk history cannot be reordered or filtered into an invalid suffix. Lifecycle outbox planning also discovers the root outbox prerequisite and rejects an unselected pending root. Independent histories follow shared, audit, outbox, lifecycle order; later unselected shared owners are not implicitly appended.

Plans bind whole participating native sources, ownership guards, audit fresh preflight and persisted ledger metadata. V1 uses domain-separated SHA-256 with big-endian uint64 numbers/counts, length-prefixed strings and fixed 32-byte digests. No SQL, process identity or observation time is exposed. Returned collections belong to the caller; mutation invalidates the digest and never changes future results. Different ledgers are separately discovered snapshots, not a global atomic snapshot. Apply rediscovers under ownership and validate the complete value before writing, including no-op plans.

Explicit operator Apply and recovery

Set StoreConfiguration.Migrations to a MigrationApplyPolicy containing trusted deployment TenantID/ActorID, a stable nonzero 32-byte LookupKey, and a positive CleanupTimeout at most one minute. LockTimeout defaults to 30 seconds, with explicit values from one second to five minutes. The velocity profile's PrimaryTimeout also bounds the entire operation, including lock acquisition; a longer lock budget cannot extend that outer deadline. Nil policy keeps Apply disabled without affecting read-only Check/Plan. Do not expose the operator policy or operation as an unauthenticated HTTP endpoint.

Supply the complete unchanged plan, globally unique command ID (16–128 ASCII letters/digits/underscore/hyphen) and an owned identity.IdempotencyKey:

result, err := stores.ReferenceMigrationApply(ctx,
    reference.ReferenceMigrationApplyRequest{
        CommandID: commandID, Plan: planned.Plan, IdempotencyKey: retryKey,
    })

One native advisory ownership interval and physical connection cover every participating namespace. Before any command, ledger or schema write, Apply checks all participating native histories, unowned-object guards and the exact rebuilt plan, including self-consistent but truncated/reordered submissions. Each native batch commits SQL, its original ledger rows and command attribution together. Fresh audit preflight and its whole history share one transaction. No migration SQL is copied or executed by a reference-owned runner.

Inspect result.Result.State() and the safe typed MigrationError; dirty, incompatible, locked, pending and unknown are not success. Only MigrationApplied proves complete current command attribution. Receipts() returns a detached sorted contributor prefix; a no-op has no applied-step receipts. A later failure does not erase earlier durable work, and a partial result is not a usable readiness claim.

Persist the original complete plan, command ID and retry key in the operator deployment workflow. Retry exactly those values to resume through a newly constructed StoreSet. Native receipts—not matching schema or a clean external suffix—are the sole progress authority. An ambiguous commit returns identity.UnknownCommitError with that original command ID. An exact retry reconciles authoritative native evidence under ownership before continuing; an unavailable authority cannot prove success or rollback. Do not generate a replacement command, infer completion from schema, advance the plan base or delete unresolved command records. Records have no automatic expiration and must be retained throughout the reconciliation window. Changing operator scope, key or policy cannot rebind an old command. Retain the original policy during recovery. Caller retry keys are never stored in plaintext.

Close cancels and drains active migration operations with finite independent cleanup, without closing the borrowed PostgreSQL pool. Startup/readiness and the complete ReferenceService/server facade remain unimplemented. These operations alone do not make the reference profile deployable.

Once selected schemas exist, features.Initialize(ctx) registers native metadata without warming risk or sending messages. Obtain the public Send interface with features.OTP(). Calls before initialization, before valid risk activation, for unselected tenants or after closure deny. Exact committed receipts can replay through a reconstructed initialized graph without a fresh counter debit; fresh requests still require activation. workers.ProcessDeliveryOne performs one explicit bounded native step; callers supply scheduling, not a replacement delivery workflow. Queue acceptance does not prove provider delivery.

Audit delivery fails closed. A lost decision gets one idempotent retry of its original immutable event; durable audit-outage handoff remains unimplemented. Authenticated-session parity, joint unknown-outcome recovery, complete operator APIs and full reference acceptance remain outstanding.

API reference

  • StoreConfiguration: one immutable selected configuration input; copied at composition and never retained as caller-owned TLS/secret slices.
  • VelocityStoreConfiguration: explicit transport, custody, scopes and traversal bounds. Zero does not select defaults.
  • ReferenceDependencies: borrowed PostgreSQL and selected envelope/sender resources.
  • OTPSendConfiguration, DeliveryConfiguration: explicit native workflow profiles.
  • ComposeStores: the sole store construction entry point; validates without IO.
  • StoreSet: sealed shared-lifetime result, not caller-constructible.
  • StoreSet.MigrationSource: pure upstream-owned migration contributions.
  • StoreSet.ReferenceMigrationCheck: authoritative read-only selected-owner compatibility, bounded by the store lifetime; no partial statuses on failure.
  • StoreSet.ReferenceMigrationPlan: deterministic read-only plan with complete participating source/history binding; no usable plan on failure.
  • MigrationApplyPolicy: explicit copied operator scope, keyed retry binding and finite ownership/cleanup policy. Nil disables Apply.
  • StoreSet.ReferenceMigrationApply: exact original plan execution and native same-command reconciliation/resume, with immutable bounded receipts.
  • StoreSet.RecoverVelocity: one bounded, fail-closed recovery/activation.
  • StoreSet.Close: permanent cancellation and bounded joining; repeated calls are safe, and a deadline does not reopen ownership.
  • ComposeProviders, ComposeWorkers, ComposeFeatures: one sealed selected graph.
  • FeatureSet.Initialize, FeatureSet.OTP: explicit startup and public Send access.
  • WorkerSet.ProcessDeliveryOne: one explicit native delivery step, without polling.

Formatting is redacted and JSON/text serialization is denied for composition inputs and handles. See Go documentation for exact errors and lifetime semantics.

Security and adoption tradeoffs

PostgreSQL is authoritative; Valkey is an ephemeral projection. Recovery never debits a counter or creates mutation intents. It restores original values, observations and absolute expiry, not refreshed windows. Live primary ownership, unknown history, corruption, missing native custody, lost acknowledgements, incomplete coverage or exhausted bounds grant no store. Later counter calls recheck the exact original primary/native chain without resetting its expiry. No SQL transaction spans native IO.

Tenant scopes are selected at deployment, not accepted dynamically from requests. Only one in-flight recovery per selected tenant is permitted; different selected tenants can proceed concurrently. The primary owns cross-process exclusion. Local configuration and copied handles do not grant takeover authority.

This slice deliberately does not renew healthy leases or reconcile a foreign owner's opaque live marker. Existing handles become unavailable at their original activation expiry. Cross-process recovery, continuous workers and additional deployment topologies remain release work. Do not treat this module as a production-ready login service.

FAQ

Why doesn't an empty deployment immediately accept traffic? It cannot prove the previous maximum window contained no unresolved work. The authoritative journal lifetime starts at real insertion time, never one hour in the past.

Can I inject a journal, health checker or effect callback? No. The concrete owned adapters are constructed once with paired opaque authorities. Dependencies contain deployment resources, not a consumer-written identity workflow.

Does the historical-origin integration fixture prove fresh bootstrap? No. It tests joint mechanics conditioned on established coverage. Only the separate actual one-hour lane can prove genuine fresh warmup.

Verification and release notes

Configure MagicLink.Request.Signup with the same identifier comparison and retirement key history used by other creation methods, plus its matching versioned email-possession policy. Request/delivery retains prospective signed creation without creating a user; consumption creates account, verified email, empty factor authority, policy authority and session atomically. Existing verified recipients sign in normally. The selected migration catalog includes the owner registration and factor-provenance extensions without requiring the password signup workflow or modifying installed history prefixes. HTTP consumption receives the actual native issuer's proof limits.

The corrected prospective supersession family is keyed by original mailbox, browser and policy rather than newly prepared IDs. When adopting it from an experimental deployment, drain issuing workers and retained preparations and expire outstanding old prospective grants before enabling the new profile; mixed-version prospective issuance/rollback is not supported. Existing-recipient families are unchanged. Neither this profile nor selected TOTP completion implies public MFA enrollment or complete platform release qualification.

Integration tests require isolated loopback PostgreSQL and explicit native TLS configuration. Apply/Plan/Check do not connect to Valkey; risk/OTP runtime tests additionally require authenticated TLS Valkey. Missing fixture inputs fail. The actual warmup test requires IDENTITY_REFERENCE_REAL_WARMUP=1 and a timeout exceeding one hour. No tests contact existing application services. Exact coverage, mutation, interoperability, clean-consumer and complete reference acceptance gates remain release requirements. See CHANGELOG.md.

Selected factor management composition

For email-OTP factors, independently select MFAOTPEnrollmentConfiguration.ActiveStepUp, with a consuming PurposeStepUp policy and native origins/signing configuration. Leave its native Primary and Issuance absent: the graph supplies actual current-session and OTP/delivery owners. Password/OTP login must also be selected. The native FeatureSet.MFAOTPActiveStepUp handle accepts action-bound OtpSend/OtpVerify; the verification input names the original send and returns one factor-update proof, not a session. Delivery uses the existing selected worker/sender.

Set optional ActiveStepUp.FactorManagement with explicit proof/primary maximum ages, leaving owner overrides and replacement selections absent. FeatureSet.MFAOTPFactorManagement then supports optimistic rename with atomic proof consumption and session revocation. Select MFAOTPEnrollment.Listing to read safe labels after a fresh password/OTP signin. Selected migrations append OTP proof/management and existing session-disposition histories; apply them before initialization. No new HTTP routes are enabled. Native acceptance lives in TestReferencePostgresOTPAuthenticatedFactorRename and TestReferencePostgresOTPFactorRenameCommitRecovery; these do not qualify the full MFA unit or remaining management variants.

For sole-active email-OTP removal, additionally set ActiveStepUp.FactorManagement.RemovalRecoveryPath to authentication.RecoveryPathEmail and select the full native PasswordReset request/completion workflow. Leave RemovalRecovery absent: composition supplies that actual owner and rejects incomplete selection. Apply the appended OTP removal history before serving. An original fresh OTP action proof authorizes FactorUpdate(Remove) with an empty name and current version. Recipient-reference erasure, recovery-set retirement, proof consumption, factor generation, session revocation and events commit atomically. Native removal, competing commands and original COMMIT recovery are exercised by TestReferencePostgresOTPFactorRemoval*; the removed-factor session cannot continue, and delivered email reset remains usable. This selects no HTTP route, disable, replacement or weaker-factor fallback.

For native OTP disable, select ActiveStepUp.Disable with positive proof/primary maximum ages and RecoveryPath: authentication.RecoveryPathEmail. Leave its Primary, Sessions and Recovery absent. Select complete PasswordReset and include identity.mfa.disable in ActiveStepUp.Native.AllowedPurposes. The graph supplies actual session/CSRF, OTP/delivery, recovery and effect owners. Use FeatureSet.MFAOTPActiveStepUp() to send and verify a fresh challenge with StepUp.Purpose: "identity.mfa.disable", then pass that proof to the owner returned by FeatureSet.MFAOTPDisable(). OneFactor requires the factor ID and preserves unconfirmed OTP siblings; AllFactors requires an empty factor ID and erases those siblings too. Both require the sole active OTP factor and current usable email recovery. Apply the appended OTP disable and shared session-disable histories before use. Original retries/recovery expose outcome metadata only; they never redeliver proof or repeat erasure. Factor management and HTTP are independent selections. Native one/all, competing commands and actual COMMIT recovery are exercised by TestReferencePostgresOTPDisable*. All-target has the native bound of 63 retained pending siblings, including expired pending rows. Overflow rolls back the complete operation without partial erasure; one-target preserves untargeted pending history.

Set MFAEnrollmentConfiguration.ActiveStepUp, then optional FactorManagement with explicit primary/factor maximum ages. The graph supplies the actual native primary and session-effect owners; caller-written overrides are rejected. FeatureSet.MFAFactorManagement enables native rename without requiring any management, step-up, regeneration or session HTTP route.

For transport, separately set HTTPMFAFactorUpdate with trusted origins and the shared keyed rate namespace/key. Set HTTPMFAActiveStepUp.Purposes to include identity.mfa.factor-update if HTTP should produce the proof. Selected origins must be a subset of native step-up origins. Unselected routes and metadata are absent; incomplete selected dependencies fail composition. Graph drain/close guards apply to native and HTTP calls. Real-adapter journeys exercise fresh TOTP proof, optimistic rename, rollback, session invalidation and original outcome recovery; this is not complete MFA or platform release qualification.

For the single-active-TOTP removal profile, additionally select FactorManagement.RemovalRecoveryPath = authentication.RecoveryPathEmail and the real PasswordResetConfiguration request/completion owner with required HIBP and delivery dependencies. Leave RemovalRecovery absent: the graph supplies that native owner, rejecting caller substitutions. Selected migrations append optional MFA v10 after v9; rename-only histories stay unchanged. Removal erases factor material, retires its recovery-code sets and revokes all subject sessions only while verified email and unambiguous usable password authority remain current. Native removal does not select HTTP reset or management routes. Select HTTPMFAFactorUpdate.Actions explicitly for removal and independently select HTTPPasswordReset when HTTP recovery is wanted. Real native and HTTP journeys prove removal → emailed reset → completion → new-password login without resurrecting factors or reusing the revoked session. Other recovery paths and general multi-factor management remain unfinished; explicit disable is described above.

For same-profile pending TOTP replacement, additionally set FactorManagement.Replacement = &mfapostgres.TOTPReplacementConfig{RecoveryCodes: 10}. The graph supplies authentic URI/confirmation parent custody, current-session authority and the session-owned atomic revocation effect; caller substitutions are rejected. Selected migration history appends MFA v12 and disposition v4. Native-only selection exposes no management HTTP route. Separately include mfa.Replace in HTTPMFAFactorUpdate.Actions and select provisioning/confirmation HTTP when desired; the graph freezes the transport code count from native policy.

Use the original session and CSRF for pending URI reveal and confirmation. The predecessor and its recovery codes remain usable while the successor's codes are non-authenticating. A later real authority read does not extend original proof, primary or ceremony expiry. After confirmation, all prior subject sessions are revoked; the new TOTP/recovery set supports ordinary password-first signin. General multi-factor, other-method, trusted-device and administrative replacement remain unfinished. Local slice behavior is not whole-unit release qualification.

Independently selected verified-phone replacement

StoreConfiguration.PhoneChange selects the actual native replacement owner. Supply its number policy, distinct send/update ActionPrimaryConfig audiences, PhoneChangeConfig and PhoneIssuanceConfiguration; leave injected issuer, risk evaluator/keys and notice delivery/templates zero. For cookie primaries, leave their CSRF keys zero for injection from PasswordVerification. Select real password verification, session, OTP, delivery and independent email/password signin/reset owners. Register both action targets in password verification and the selected SMS provider worker. No application-owned domain stores are needed.

HTTPPhoneChange independently selects cookie send/update/original recovery, with trusted Origin, the existing signed browser-device profile and policy revision. It requires shared durable HTTP rate storage. Do not also select HTTPPhoneVerification: those profiles intentionally share one canonical send path and conflicting selection denies. Native enrollment, removal and phone login selections remain independent. Disabled HTTP contributes no route or OpenAPI metadata.

Apply the selected reference migration plan before initialization/serving. Replacement appends native kernel version1901 and password version26 after their required removal predecessors, retaining all installed checksums and operator history. Installing those predecessors does not enable removal routes.

Consumer journey: sign in through retained email/password, read the session ID, obtain an action-bound send proof, submit exact old identifier versions and the new number, capture the provider's SMS, obtain a distinct identity.phone.update proof, and submit that proof with the original SMS command/code and a new retry key. A committed response queues old-number notification and cascade cleanup; it does not issue a replacement session or claim downstream cleanup finished. Old identifier-bound sessions and the retired phone deny; new-phone and retained email signin remain usable. Retry with the original key or use code-free recovery; never interpret unknown as rollback.

The executable TestReferencePostgresPhoneChangeHTTPS consumer in phone_change_integration_test.go supplies complete configuration and exercises public composition with genuine PostgreSQL, populated migration/reconstruction, HTTPS and captured sender IO. From this module, run:

go test -race -tags=integration \
  -run '^TestReferencePostgresPhoneChangeHTTPS$' .

Use a task-owned PostgreSQL database at IDENTITY_REFERENCE_POSTGRES_PORT (loopback, user postgres, database identity_test, disposable trust authentication). The test creates and removes its own database. Never point it at existing data. Complete phone/reset/MFA variants and full release qualification remain pending.

Documentation

Overview

Package reference owns deployment composition for the identity platform. This development slice composes PostgreSQL-journaled Valkey velocity recovery and optional native OTP Send/delivery. It is not the complete reference server.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyConfiguration

type APIKeyConfiguration struct {
	// MetadataPaging selects the native additive owner paging indexes. Exact-key
	// Get needs no extra schema; selected HTTP List requires this explicit choice.
	MetadataPaging bool
	// OrganizationOwned selects the actual organization repository and its
	// independent credential epoch. Organization must also be configured.
	OrganizationOwned    bool
	Configuration        apikey.Configuration
	MaximumDuration      time.Duration
	PolicyID             string
	Pepper               apikey.Pepper
	Counters             riskpg.Config
	RiskConfigurationID  string
	RiskKeys             []risk.EvidenceKey
	ActiveEnvelopeKeyID  string
	RetainedEnvelopeKeys map[string][]byte
	// LegacyConfiguration independently selects one verify-only SHA-256 profile.
	// Zero preserves modern-only storage, startup and operation selection.
	LegacyConfiguration apikey.Configuration
	// ValidateCanonicalKeyID is required only with LegacyConfiguration. It must
	// honor cancellation, preserve existing canonical IDs and be concurrency-safe.
	// It supplies identifier policy, never owner or import-source authority.
	ValidateCanonicalKeyID func(context.Context, apikey.KeyID) error
}

APIKeyConfiguration selects native password-bearer key management, independently of HTTP. User ownership is the default; organization ownership requires the explicit selected native owner. Modern issuance remains mandatory; legacy digest import and verification require explicit selection. Current session/profile, policy, coordinator, request-key and risk-evaluator ownership are derived from this graph; callers supply no replacement authority or domain store. Counters must select the same protected policy/version and schema, with lockout enforcement. Pepper, envelope and risk key history must be retained for original pending commands. Construction copies custody; MaximumDuration is positive and at most5s.

func (APIKeyConfiguration) Format

func (APIKeyConfiguration) Format(s fmt.State, _ rune)

func (APIKeyConfiguration) MarshalJSON

func (APIKeyConfiguration) MarshalJSON() ([]byte, error)

func (APIKeyConfiguration) MarshalText

func (APIKeyConfiguration) MarshalText() ([]byte, error)

type APIKeyMetadataRateConfiguration

type APIKeyMetadataRateConfiguration struct {
	Namespace            string
	EmergencyMaximumKeys int
	Degraded             func(context.Context, identityhttp.SafeRateEvent) error
}

APIKeyMetadataRateConfiguration selects a safe-read owner only when no other safe HTTP owner is selected. Degraded must synchronously record emergency decisions within ctx and support concurrent calls; it grants no key authority.

func (APIKeyMetadataRateConfiguration) Format

Format redacts deployment policy and callbacks.

func (APIKeyMetadataRateConfiguration) MarshalJSON

func (APIKeyMetadataRateConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit callback/policy export.

func (APIKeyMetadataRateConfiguration) MarshalText

func (APIKeyMetadataRateConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit callback/policy export.

type APIKeyService

type APIKeyService struct {
	// contains filtered or unexported fields
}

APIKeyService exposes the selected native management and atomic verification owner behind this graph's startup, tenant and shutdown guards. It owns no pool or separate journal. Independent calls are concurrent-safe; recovery remains original status observation, not execution or secret reconstruction.

func (*APIKeyService) Create

Create retains original keyed self-owned native issuance and reveal custody.

func (*APIKeyService) CreateOrganization

CreateOrganization retains genuine current human management independently of the explicitly selected organization credential owner. It shares this graph's admission, lifetime and native original reveal-once custody.

func (APIKeyService) Format

func (APIKeyService) Format(s fmt.State, _ rune)

func (*APIKeyService) Get

Get returns copied stored metadata under current native human/owner policy. It retains this graph's tenant/startup/shutdown guards and never verifies or debits a key. Exact-key lookup requires no optional paging migration.

func (*APIKeyService) Import

Import retains the selected native digest-only workflow, current source and owner authorization, and original outcome recovery. It never issues a key.

func (*APIKeyService) List

List returns a bounded live-view page under repeated current native policy. Its cursor grants no authority or held snapshot. Select MetadataPaging and apply its owned migrations first; otherwise the native read fails closed.

func (APIKeyService) MarshalJSON

func (APIKeyService) MarshalJSON() ([]byte, error)

func (APIKeyService) MarshalText

func (APIKeyService) MarshalText() ([]byte, error)

func (*APIKeyService) ReconcileVerifyAndConsume

ReconcileVerifyAndConsume observes one exact original verification attempt. It preserves original authority deadlines and does not execute missing work.

func (*APIKeyService) Recover

Recover observes the exact original command under current native authority.

func (*APIKeyService) RecoverOrganization

RecoverOrganization observes only the exact original command under current member authority. Retain its target even when an unknown create has no key row; status recovery neither executes work nor reconstructs key plaintext.

func (*APIKeyService) Revoke

Revoke retains native terminal tombstones and exact original-key effects.

func (*APIKeyService) Rotate

Rotate retains zero-overlap native successor issuance without widening grants.

func (*APIKeyService) Update

Update replaces only a key's name and non-expanding permission ceiling under native current fresh authority. It retains graph lifetime/tenant guards and exact original-key recovery, returning copied metadata without key material.

func (*APIKeyService) VerifyAndConsume

VerifyAndConsume retains native atomic current-authority verification and narrowing, including persisted denial. It never issues a browser session.

type AnonymousConfiguration

type AnonymousConfiguration struct {
	Signin     anonymouspg.SigninConfig
	Validation session.ServiceConfig
	PreAuth    PasswordPreAuthConfiguration
	Deletion   *anonymouspg.DeletionConfig
	Upgrade    *AnonymousUpgradeConfiguration
	Cleanup    *anonymouspg.CleanupConfig
}

AnonymousConfiguration selects native guest creation/read and optionally self-deletion, upgrade and trusted abandoned-guest maintenance. It enables no HTTP or scheduler. Cleanup is independent of Deletion; its Clock must be nil for this graph's system-clock injection. Signin.Risk.Evaluation must be zero for injection of this graph's counted owner. PreAuth selects its exact original-flow initiation; lookup key comes from Signin.FlowKeys. Deletion uses the same repository/session/profile/CSRF policy as issuance and its real protected counter owner. No application domain stores are accepted.

func (AnonymousConfiguration) Format

func (AnonymousConfiguration) Format(s fmt.State, _ rune)

func (AnonymousConfiguration) MarshalJSON

func (AnonymousConfiguration) MarshalJSON() ([]byte, error)

func (AnonymousConfiguration) MarshalText

func (AnonymousConfiguration) MarshalText() ([]byte, error)

type AnonymousService

type AnonymousService struct {
	// contains filtered or unexported fields
}

AnonymousService retains this graph's actual native guest workflows. It owns no resources; independent calls are concurrency-safe and preserve tenant, initialization, shutdown and original native deadlines. Zero denies. Recovery reconciles original commands only, never reexecutes or redelivers credentials. Unsupported operations remain unavailable even if a sibling was selected.

func (*AnonymousService) CleanupExpired

CleanupExpired executes explicitly selected, tenant-bound maintenance under its configured service actor. It enables no HTTP route or background job. Individual items retain the native original-command recovery contract.

func (*AnonymousService) Delete

Delete executes selected native self-disposal with required atomic effects.

func (*AnonymousService) Format

func (*AnonymousService) Format(s fmt.State, _ rune)

Format hides retained graph resources and custody for every formatting verb.

func (*AnonymousService) Get

Get recognizes explicitly unprivileged guest custody, never a verified user.

func (*AnonymousService) MarshalJSON

func (*AnonymousService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit export of borrowed graph custody.

func (*AnonymousService) MarshalText

func (*AnonymousService) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key export of borrowed graph custody.

func (*AnonymousService) RecoverCleanup

RecoverCleanup reconciles an original service-owned cleanup command without requiring an expired guest credential or repeating its disposal.

func (*AnonymousService) RecoverDeletion

RecoverDeletion queries retained original possession, not new active admission.

func (*AnonymousService) RecoverSignin

RecoverSignin authenticates original flow possession for metadata-only query.

func (*AnonymousService) RecoverUpgrade

RecoverUpgrade retains both original command scopes without credential reveal.

func (*AnonymousService) Signin

Signin executes the selected actual keyed guest-creation workflow once.

func (*AnonymousService) Upgrade

Upgrade delegates to the native two-command, one-use protected transition.

type AnonymousUpgradeConfiguration

type AnonymousUpgradeConfiguration struct {
	Primary               passwordpg.ActionPrimaryConfig
	ProofAudience         string
	Issuer                session.IssuerConfig
	CSRF                  session.CSRFKey
	Capability            capabilitypg.IssuerConfig
	CapabilityPreparation capabilitypg.IssuancePreparationConfig
}

AnonymousUpgradeConfiguration selects the finite existing-password target without resource transfers. Primary must name identity.anonymous.upgrade and use cookie custody with CSRFKeys absent; this graph injects its existing password verification/target session owners and synchronizers. ProofAudience is the selected target session audience in this profile. Capability custody retains the native issuer/preparation keys for original-command recovery. Issuer and CSRF must match the selected permanent cookie policy and retained read/signout keys; incompatible replacement credentials fail at composition.

func (AnonymousUpgradeConfiguration) Format

func (AnonymousUpgradeConfiguration) MarshalJSON

func (AnonymousUpgradeConfiguration) MarshalJSON() ([]byte, error)

func (AnonymousUpgradeConfiguration) MarshalText

func (AnonymousUpgradeConfiguration) MarshalText() ([]byte, error)

type BootstrapPolicy

type BootstrapPolicy struct{ Enabled bool }

BootstrapPolicy selects the offline bootstrap operation. Enabling remains rejected until its native one-time authority workflow is composed.

type DegradationCode

type DegradationCode string

DegradationCode is a stable opaque optional-dependency label.

type DeliveryConfiguration

type DeliveryConfiguration struct {
	Enqueue   deliverypg.EnqueueConfig
	Templates []delivery.Template
}

DeliveryConfiguration owns delivery custody, retained policies and templates once for OTP and its real delivery workers. StateTracking is mandatory. Native receipt/cancellation/reconciliation selections retain their adapter semantics; this slice exposes processing, not their complete operator APIs. Authorization is the exact existing service in OTP.RequestKeys.Policy. Workers share the strictest retained SenderConcurrency ceiling, acquired before claiming. Supply a dedicated sender instance for this graph; sharing it with unrelated graphs or direct callers requires external capacity control.

func (DeliveryConfiguration) Format

func (DeliveryConfiguration) Format(s fmt.State, _ rune)

func (DeliveryConfiguration) MarshalJSON

func (DeliveryConfiguration) MarshalJSON() ([]byte, error)

func (DeliveryConfiguration) MarshalText

func (DeliveryConfiguration) MarshalText() ([]byte, error)

type DeploymentProfile

type DeploymentProfile uint8

DeploymentProfile selects authoritative PostgreSQL with optional Valkey. Zero is invalid. PostgreSQL-only selects durable admission; the optional Valkey profile keeps its explicit native recovery and coverage requirements.

const (
	PostgresOnly DeploymentProfile = iota + 1
	PostgresWithValkey
)

type DurableAdmissionConfiguration

type DurableAdmissionConfiguration struct {
	Schema, Namespace string
	Policy            risk.Policy
	Keys              []risk.CounterDigestKey
	ReplayKey         []byte
	Tenants           []string
	MaximumRecords    int64
	Timeout           time.Duration
}

DurableAdmissionConfiguration selects the PostgreSQL-only deployment's durable fixed-window admission authority. No store or fabricated result may be supplied by callers. Namespace/replay custody is stable across restarts; dimension Keys retain complete newest-first history. Tenants is an explicit 1..128 scope allowlist. MaximumRecords and Timeout obey DurableCounterConfig. Capacity exhaustion denies rather than evicting retained attempts. Protected mutation counters remain owned by their native transaction participants.

func (DurableAdmissionConfiguration) Format

func (DurableAdmissionConfiguration) MarshalJSON

func (DurableAdmissionConfiguration) MarshalJSON() ([]byte, error)

func (DurableAdmissionConfiguration) MarshalText

func (DurableAdmissionConfiguration) MarshalText() ([]byte, error)

type EmailAddressAuditConfiguration

type EmailAddressAuditConfiguration struct{ MaximumDuration time.Duration }

EmailAddressAuditConfiguration bounds required administrative acknowledgements within the query deadline. No retries, detached writes or fail-open fallback are selected. The graph borrows its existing PostgreSQL pool.

type EmailAddressConfiguration

type EmailAddressConfiguration struct {
	Native identity.UserQueryConfig
	Redact identity.RedactFunc
	// AdministrativeAudit explicitly selects required access auditing through
	// the existing native PostgreSQL audit owner, not another domain store.
	AdministrativeAudit *EmailAddressAuditConfiguration
}

EmailAddressConfiguration selects authorized primary list/get. Native.Clock must be absent: the actual session authority supplies it. Canonical-ID and disclosure callbacks are explicit bounded application policy, not stores or browser authority. The graph supplies the primary repository and authorizer.

func (EmailAddressConfiguration) Format

func (EmailAddressConfiguration) Format(s fmt.State, _ rune)

Format redacts application disclosure and canonical-ID callbacks.

func (EmailAddressConfiguration) MarshalJSON

func (EmailAddressConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit policy export.

func (EmailAddressConfiguration) MarshalText

func (EmailAddressConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit policy text export.

type EmailAddressService

type EmailAddressService struct {
	// contains filtered or unexported fields
}

EmailAddressService retains graph lifetime for authorized email primary reads. It grants no authentication or administrative rights. Zero denies.

func (*EmailAddressService) AddressGet

AddressGet delegates current owner/admin policy and safe projection.

func (*EmailAddressService) AddressList

AddressList delegates bounded, scope-bound pagination without mutation.

func (*EmailAddressService) AdministrativeQueriesConfigured

func (s *EmailAddressService) AdministrativeQueriesConfigured() bool

AdministrativeQueriesConfigured reports live required-audit composition only, never a permission or identity-validity guarantee. A closed graph denies.

func (EmailAddressService) Format

func (EmailAddressService) Format(s fmt.State, _ rune)

Format redacts retained graph and authorization custody.

func (EmailAddressService) LogValue

func (EmailAddressService) LogValue() slog.Value

LogValue emits no graph or policy metadata.

func (EmailAddressService) MarshalJSON

func (EmailAddressService) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit query-owner export.

func (EmailAddressService) MarshalText

func (EmailAddressService) MarshalText() ([]byte, error)

MarshalText denies implicit query-owner text export.

type EmailAddressStandaloneRateConfiguration

type EmailAddressStandaloneRateConfiguration struct {
	Namespace            string
	EmergencyMaximumKeys int
	Degraded             func(context.Context, identityhttp.SafeRateEvent) error
}

EmailAddressStandaloneRateConfiguration selects canonical safe-rate policy only when no existing HTTP session/MFA-list safe limiter is selected. It grants no identity authority. Degraded must synchronously record each fallback within ctx; it must be concurrency-safe and launch no detached work.

func (EmailAddressStandaloneRateConfiguration) Format

Format redacts the borrowed fallback recorder and policy scope.

type EmailConfiguration

type EmailConfiguration struct {
	Verification    *EmailManagementConfiguration
	Change          *EmailManagementConfiguration
	Addresses       *EmailAddressConfiguration
	Removal         *EmailRemovalConfiguration
	OTPVerification *EmailOTPVerificationConfiguration
	OTPChange       *EmailOTPChangeConfiguration
	// OTPChangeInitialPrimary explicitly permits the existing sole-verified,
	// no-primary change policy through OTP. OTPChange must also be selected.
	// Zero preserves genuine-primary-only behavior and enables no HTTP route.
	OTPChangeInitialPrimary bool
	// TOTPChange selects active-TOTP proof admission for Change only. It
	// requires explicit MFA ActiveStepUp.EmailChange, a genuine verified primary
	// and matching proof audience. Zero retains password/known-empty admission.
	// The selected link cannot outlive original proof/freshness/session custody.
	// New-address OTP and initial-primary variants are not selected by this flag.
	TOTPChange bool
}

EmailConfiguration selects native email capabilities, not HTTP. Nil entries expose no handle or feature. Management uses the selected password verification owner's original proof/session authority; address reads use the graph's authorization and disclosure policy. Removal requires actual selected password signin/reset owners. No UI or auto-signin is enabled.

func (EmailConfiguration) Format

func (EmailConfiguration) Format(s fmt.State, _ rune)

Format redacts borrowed native policy and key custody.

func (EmailConfiguration) MarshalJSON

func (EmailConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (EmailConfiguration) MarshalText

func (EmailConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text export.

type EmailManagementConfiguration

type EmailManagementConfiguration struct {
	Native   passwordpg.EmailManagementConfig
	Primary  passwordpg.EmailPrimaryConfig
	Counters riskpg.Config
	// Keyed optionally enables original-input correlation on the same native
	// journal. Nil exposes no keyed calls; unkeyed native calls stay unchanged.
	// Request-key policy must use the graph's current query-policy revision.
	Keyed *passwordpg.KeyedEmailManagementConfig
}

EmailManagementConfiguration selects one delivered-link native workflow. Primary.Action and Primary.CSRFKeys must be absent: the selected slot fixes action, and cookie mode borrows the graph's actual verification synchronizer. Primary audience/age/transport must be explicit and its exact target must be allowed by PasswordVerification. Native counters/evaluator/evidence keys, counter policy and delivery renderer/owner must be absent; this graph supplies those owners. Counters uses the existing risk namespace and policy revision. Change notification renderer, when selected, also comes from graph templates. Configuration callbacks/resources are borrowed, bounded and concurrency-safe.

func (EmailManagementConfiguration) Format

Format redacts borrowed native proof, risk and delivery configuration.

func (EmailManagementConfiguration) MarshalJSON

func (EmailManagementConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit native configuration export.

func (EmailManagementConfiguration) MarshalText

func (EmailManagementConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit native text export.

type EmailOTPChangeConfiguration

type EmailOTPChangeConfiguration EmailOTPVerificationConfiguration

EmailOTPChangeConfiguration has the same explicit bounded issuance and key fields as EmailOTPVerificationConfiguration, but Policy must select email change. It requires Email.Change with its old-address notice, actual password session authority and an independent request-key namespace. The graph supplies the original native owner; callers cannot substitute origin custody. Native selection enables no HTTP route or automatic login. First-primary establishment additionally requires Email.OTPChangeInitialPrimary and the original explicit sole-verified change policy; zero retains genuine-primary replacement only.

func (EmailOTPChangeConfiguration) Format

Format redacts retained session/request keys and deployment configuration.

func (EmailOTPChangeConfiguration) MarshalJSON

func (EmailOTPChangeConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit key export.

func (EmailOTPChangeConfiguration) MarshalText

func (EmailOTPChangeConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit key export.

type EmailOTPChangeService

type EmailOTPChangeService struct {
	// contains filtered or unexported fields
}

EmailOTPChangeService borrows the selected native genuine-primary workflow. It owns no pool, journal or goroutines. Calls preserve original custody and obey graph, caller and native bounds. Zero and retained closed handles deny.

func (*EmailOTPChangeService) EmailChangeChallenge

EmailChangeChallenge preserves original purpose/target/session scope for transport budgets; it compares no code and grants no replacement permission.

func (*EmailOTPChangeService) EmailChangeConfirm

EmailChangeConfirm preserves the sole atomic primary/notice/OTP transition.

func (*EmailOTPChangeService) EmailChangeRequest

EmailChangeRequest preserves independent native issuance and original intent.

func (*EmailOTPChangeService) EmailChangeSendDestination

func (s *EmailOTPChangeService) EmailChangeSendDestination(ctx context.Context, r otp.EmailChangeRequest) (otp.DestinationInput, error)

EmailChangeSendDestination preserves authentic original transport budget correlation without issuance, mutable recipient substitution or renewal.

func (*EmailOTPChangeService) EmailChangeSession

func (s *EmailOTPChangeService) EmailChangeSession(ctx context.Context, tenant identity.TenantID, flow otp.SendFlow) (session.Session, error)

EmailChangeSession authenticates original token possession without renewing its validity or granting current mutation/disclosure authority.

func (*EmailOTPChangeService) Format

func (*EmailOTPChangeService) Format(s fmt.State, _ rune)

Format redacts graph internals.

func (*EmailOTPChangeService) LogValue

func (*EmailOTPChangeService) LogValue() slog.Value

LogValue redacts graph internals.

func (*EmailOTPChangeService) MarshalJSON

func (*EmailOTPChangeService) MarshalJSON() ([]byte, error)

MarshalJSON rejects graph export.

func (*EmailOTPChangeService) MarshalText

func (*EmailOTPChangeService) MarshalText() ([]byte, error)

MarshalText rejects graph export.

func (*EmailOTPChangeService) RecoverEmailChange

RecoverEmailChange observes original metadata without comparison or mutation.

type EmailOTPVerificationConfiguration

type EmailOTPVerificationConfiguration struct {
	Policy                   otp.AttemptPolicy
	Domain                   kernel.EmailAttachmentDomainConfig
	SessionKeys              map[uint32][]byte
	FreshnessLimit           time.Duration
	CurrentAttemptKeyVersion uint32
	RequestKeys              kernel.RequestKeyConfig
	IntentKey, IdentifierKey [32]byte
	TemplateID               string
	TemplateVersion          uint32
	LocaleChain              []string
	// VerificationHooks is explicit completion policy/observation, not delivery
	// or send policy. Each OTP workflow selects it independently; nil disables.
	VerificationHooks *email.VerificationHooks
}

EmailOTPVerificationConfiguration selects native pending-email OTP separately from link management and HTTP. Policy is explicitly email verification. SessionKeys must read the graph's current password issuer and may contain only graph-readable retained versions. FreshnessLimit is explicit and cannot renew the session owner's earlier freshness/lifetime. RequestKeys uses a dedicated namespace with the same authoritative policy/revision as OTP. Native pools, risk evaluator, codec/delivery owners and migrations come from this graph.

func (EmailOTPVerificationConfiguration) Format

Format redacts retained session and request-key configuration.

func (EmailOTPVerificationConfiguration) MarshalJSON

func (EmailOTPVerificationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects configuration export.

func (EmailOTPVerificationConfiguration) MarshalText

func (EmailOTPVerificationConfiguration) MarshalText() ([]byte, error)

MarshalText rejects configuration export.

type EmailOTPVerificationService

type EmailOTPVerificationService struct {
	// contains filtered or unexported fields
}

EmailOTPVerificationService borrows the graph's selected native workflow. It owns no pool, journal or goroutines. Calls borrow actual original session possession, obey graph/caller bounds and deny after graph Close. Zero denies.

func (*EmailOTPVerificationService) EmailVerificationChallenge

EmailVerificationChallenge preserves authenticated original verification correlation for transport budgets, not code proof or renewed validity.

func (*EmailOTPVerificationService) EmailVerificationSendDestination

EmailVerificationSendDestination preserves original keyed source for budgets; it creates no preparation, challenge or delivery and grants no admission.

func (*EmailOTPVerificationService) EmailVerificationSession

func (s *EmailOTPVerificationService) EmailVerificationSession(ctx context.Context, tenant identity.TenantID, flow otp.SendFlow) (session.Session, error)

EmailVerificationSession maps original token possession for transport only; it neither validates a current session nor renews its lifetime or authority.

func (*EmailOTPVerificationService) EmailVerify

EmailVerify preserves native atomic code use and pending-address verification.

func (*EmailOTPVerificationService) RecoverEmailVerify

RecoverEmailVerify observes only original native metadata, never a new code comparison, address projection, session, resend or mutation.

func (*EmailOTPVerificationService) SendEmailVerification

SendEmailVerification preserves native current authority, risk, one-code issuance and original request correlation; it verifies no address itself.

type EmailRemovalConfiguration

type EmailRemovalConfiguration struct {
	Native   passwordpg.EmailRemovalConfig
	Primary  passwordpg.EmailPrimaryConfig
	Counters riskpg.Config
}

EmailRemovalConfiguration selects protected native self-removal without HTTP. Primary.Action/CSRFKeys and Native counters/provider evaluator/keys/policy must be absent; the graph supplies those actual owners. Both password signin and emailed reset request/completion must be selected. Native.Domain defines the explicit primary/recovery, reuse and pending lifecycle admission policy. Borrowed configuration callbacks/resources must remain concurrency-safe.

func (EmailRemovalConfiguration) Format

func (EmailRemovalConfiguration) Format(s fmt.State, _ rune)

Format redacts retained proof, key and policy custody.

func (EmailRemovalConfiguration) MarshalJSON

func (EmailRemovalConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (EmailRemovalConfiguration) MarshalText

func (EmailRemovalConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export.

type EmailRemovalService

type EmailRemovalService struct {
	// contains filtered or unexported fields
}

EmailRemovalService binds selected native removal to the composed graph lifetime. It owns no pool, proof authority, journal or goroutine. Calls borrow request custody until return; retained handles deny after graph Close. Zero denies.

func (*EmailRemovalService) AddressRemove

AddressRemove preserves native original-input correlation, fresh proof, actual remaining signin/reset eligibility and atomic revocation/cascade.

func (*EmailRemovalService) AddressRemoveRateSource

func (s *EmailRemovalService) AddressRemoveRateSource(ctx context.Context, r email.AddressRemoveRequest) (identity.UserID, error)

AddressRemoveRateSource authenticates original correlation before transport admission without removal or proof consumption. The user must not be logged.

func (*EmailRemovalService) AddressRemoveRecover

AddressRemoveRecover observes the original scoped outcome under current query authorization. It cannot repeat removal or refresh original evidence.

func (*EmailRemovalService) AdministrativeRemovalConfigured

func (s *EmailRemovalService) AdministrativeRemovalConfigured() bool

AdministrativeRemovalConfigured reports explicit live native selection, not permission, authentication or renewed validity. Closed graphs deny.

func (EmailRemovalService) Format

func (EmailRemovalService) Format(s fmt.State, _ rune)

Format redacts native graph and proof custody.

func (EmailRemovalService) LogValue

func (EmailRemovalService) LogValue() slog.Value

LogValue exposes no graph, credential or policy metadata.

func (EmailRemovalService) MarshalJSON

func (EmailRemovalService) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit runtime export.

func (EmailRemovalService) MarshalText

func (EmailRemovalService) MarshalText() ([]byte, error)

MarshalText denies implicit runtime export.

type FeatureSet

type FeatureSet struct {
	// contains filtered or unexported fields
}

FeatureSet exposes only selected public workflow interfaces, never concrete adapter stores. Unselected workflows remain unavailable, including OTP and delivery in the explicit passkey-only profile. Initialize and RecoverVelocity remain explicit, separate startup operations.

func ComposeFeatures

func ComposeFeatures(stores StoreSet, providers ProviderSet, workers WorkerSet) (FeatureSet, error)

ComposeFeatures consumes the same sealed stores/providers/workers exactly once. A foreign graph or absent native worker fails before exposing features.

func (FeatureSet) APIKeys

func (f FeatureSet) APIKeys() (*APIKeyService, error)

APIKeys returns the independently selected native owner without IO or HTTP activation. Handles may be retained before initialization; calls cannot run before readiness or after graph closure.

func (FeatureSet) Anonymous

func (f FeatureSet) Anonymous() (*AnonymousService, error)

Anonymous returns selected native guest operations without enabling HTTP or performing IO. The retained handle cannot outlive the graph's active lifetime.

func (FeatureSet) AnonymousPreAuth

func (f FeatureSet) AnonymousPreAuth() (PreAuthService, error)

AnonymousPreAuth returns the selected native anonymous-flow issuer without enabling HTTP or changing OTP/password initiation. Preparation, issuance and metadata-only recovery retain graph initialization, tenant and shutdown guards.

func (FeatureSet) CookiePasswordChange

func (f FeatureSet) CookiePasswordChange() (password.CookieChangeService, error)

CookiePasswordChange returns the distinct native CSRF-protected workflow. Missing cookie selection denies without bearer fallback. Retained handles deny after Close; obtaining a handle exposes no HTTP route and performs no IO.

func (FeatureSet) CookiePasswordVerification

func (f FeatureSet) CookiePasswordVerification() (password.CookieVerificationService, error)

CookiePasswordVerification returns the distinct synchronizer-protected native workflow. Missing cookie selection denies, with no tokenless bearer fallback. Obtaining either handle starts no IO and implicitly exposes no HTTP route.

func (FeatureSet) EmailAddresses

func (f FeatureSet) EmailAddresses() (*EmailAddressService, error)

EmailAddresses returns only explicitly selected list/get capabilities.

func (FeatureSet) EmailChange

func (f FeatureSet) EmailChange() (*ManagedEmailService, error)

EmailChange exposes the separately selected request/confirmation/notice workflow. Original password verification must select its exact action target.

func (FeatureSet) EmailChangeRequests

func (f FeatureSet) EmailChangeRequests() (email.ChangeRequestService, error)

EmailChangeRequests returns the separately selected keyed change-request port. New-address confirmation and old-address notification remain native effects; this handle never promotes an address or silently selects a proof policy.

func (FeatureSet) EmailOTPChange

func (f FeatureSet) EmailOTPChange() (*EmailOTPChangeService, error)

EmailOTPChange exposes only explicit native selection; HTTP is independent.

func (FeatureSet) EmailOTPVerification

func (f FeatureSet) EmailOTPVerification() (*EmailOTPVerificationService, error)

EmailOTPVerification exposes only explicit native selection, not an HTTP route, proof or authorization lease. Missing composition fails closed.

func (FeatureSet) EmailRemoval

func (f FeatureSet) EmailRemoval() (*EmailRemovalService, error)

EmailRemoval exposes only explicitly selected safe removal. No route is created and no unsupported factor or recovery owner is silently substituted.

func (FeatureSet) EmailVerification

func (f FeatureSet) EmailVerification() (*ManagedEmailService, error)

EmailVerification exposes the selected add/resend/verify native workflow. It creates no HTTP route, resource or goroutine. Retained handles deny after graph Close; the caller does not acquire the borrowed pool or signing owners.

func (FeatureSet) EmailVerificationRequests

func (f FeatureSet) EmailVerificationRequests() (email.VerificationSendService, error)

EmailVerificationRequests returns the selected storage-neutral keyed add/resend port. It creates no HTTP route or resource. Calls join graph cancellation, require an allowed tenant and deny after Close; native custody remains owned by the graph. Unselected keyed workflows are unavailable.

func (FeatureSet) Format

func (FeatureSet) Format(s fmt.State, _ rune)

func (FeatureSet) Initialize

func (f FeatureSet) Initialize(ctx context.Context) error

Initialize registers selected delivery/OTP startup metadata in order, never schema, risk coverage or business effects. Readiness separately validates all selected native schemas. Operations remain denied until selected startup succeeds; exact configuration retries are supported. The selected operation timeout and shutdown bound it; a concurrent startup returns unavailable.

func (FeatureSet) MFAActiveStepUp

func (f FeatureSet) MFAActiveStepUp() (mfa.TOTPCompletionService, error)

MFAActiveStepUp returns explicitly selected native authenticated TOTP proof issuance. It exposes no route, creates no session and accepts no login or enrollment fallback. Retained handles obey graph startup/tenant/shutdown ownership; code-free recovery cannot redeliver factor proof.

func (FeatureSet) MFADisable

func (f FeatureSet) MFADisable() (mfa.DisableService, error)

MFADisable returns separately selected native disable. It selects neither factor-update nor HTTP routes. Calls borrow exact tenant graph lifecycle; startup/drain/shutdown gates apply to retained handles on every invocation.

func (FeatureSet) MFAEnrollment

func (f FeatureSet) MFAEnrollment() (mfa.EnrollmentService, error)

MFAEnrollment returns the selected native pending TOTP enrollment workflow. It exposes no route and grants no confirmed factor authority. Calls require initialized graph custody and an allowed tenant; retained handles deny after Close. Recovery cannot redeliver recovery codes or renew primary evidence.

func (FeatureSet) MFAEnrollmentConfirmation

func (f FeatureSet) MFAEnrollmentConfirmation() (mfa.TOTPCompletionService, error)

MFAEnrollmentConfirmation returns the explicit enrollment variant of TOTP verification. Login-child requests deny; confirmation never silently upgrades the original session. Selecting it does not select HTTP or login completion.

func (FeatureSet) MFAFactorManagement

func (f FeatureSet) MFAFactorManagement() (mfa.FactorManagementService, error)

MFAFactorManagement returns separately selected native self-management. The current TOTP profile supports rename and explicitly configured sole-factor email-recovery removal; replacement remains unavailable. It selects no disable, HTTP routes, login or regeneration. Retained handles obey exact tenant and graph startup/drain/shutdown ownership.

func (FeatureSet) MFAListing

func (f FeatureSet) MFAListing() (mfa.FactorListingService, error)

MFAListing returns explicitly selected native safe factor/recovery metadata. It borrows the graph's actual session owner, requires graph initialization and exact tenant selection on every call, and denies permanently after Close. This selects no HTTP route, security-key listing or trusted-device issuance.

func (FeatureSet) MFAOTPActiveStepUp

func (f FeatureSet) MFAOTPActiveStepUp() (mfa.OTPCompletionService, error)

MFAOTPActiveStepUp returns explicitly selected authenticated OTP sending and action-proof verification, not enrollment/login or HTTP. Retained handles obey graph startup, tenant, cancellation and Close ownership. Recovery is metadata-only and never redelivers a code or factor proof.

func (FeatureSet) MFAOTPDisable

func (f FeatureSet) MFAOTPDisable() (mfa.DisableService, error)

MFAOTPDisable returns explicitly selected native OTP disable, not TOTP, factor-update or HTTP fallback. Every retained call obeys graph tenant, startup and shutdown ownership. Recovery returns original metadata only.

func (FeatureSet) MFAOTPEnrollment

func (f FeatureSet) MFAOTPEnrollment() (mfa.EnrollmentService, error)

MFAOTPEnrollment returns explicitly selected native pending enrollment. Fresh proof, original session/CSRF, current verified recipient and risk are enforced by its native owners. Enable alone never activates a factor or issues a login session. Calls retain graph startup, tenant, cancellation and Close guards. Recovery returns original metadata without revealing recovery codes again.

func (FeatureSet) MFAOTPEnrollmentConfirmation

func (f FeatureSet) MFAOTPEnrollmentConfirmation() (mfa.OTPCompletionService, error)

MFAOTPEnrollmentConfirmation returns purpose-bound sending and confirmation for the selected pending enrollment, not password-login completion. Codes are delivered by the selected worker/sender. Confirmation issues no login session; unknown outcomes recover through the original command without a second send. This handle selects no HTTP routes and remains unusable after graph Close.

func (FeatureSet) MFAOTPFactorManagement

func (f FeatureSet) MFAOTPFactorManagement() (mfa.FactorManagementService, error)

MFAOTPFactorManagement returns explicitly selected OTP factor rename. It exposes no TOTP fallback, disable, replacement or HTTP routes. Explicit email recovery additionally selects sole-active-OTP removal with session revocation. Retained handles obey the graph's tenant, startup and shutdown lifetime.

func (FeatureSet) MFAProvisioningURI

func (f FeatureSet) MFAProvisioningURI() (mfa.TOTPURIService, error)

MFAProvisioningURI returns separate original-session/CSRF disclosure. It returns material only from the first known committed reveal, never retries or recovery. Graph startup, tenant, lifetime and shutdown guards are retained.

func (FeatureSet) MFARecoveryRegeneration

func (f FeatureSet) MFARecoveryRegeneration() (mfa.RecoveryRegenerationService, error)

MFARecoveryRegeneration returns separately selected native whole-set replacement with fresh-factor proof consumption and session revocation. Retained handles obey graph startup/tenant/shutdown guards; recovery is metadata-only and cannot redeliver replacement codes. This selects no route.

func (FeatureSet) MagicLinkConsume

func (f FeatureSet) MagicLinkConsume() (MagicLinkConsumeService, error)

MagicLinkConsume returns explicit consumption only when independently selected. Obtaining a handle enables neither a route nor session issuance. Every call retains current graph startup/tenant/shutdown guards.

func (FeatureSet) MagicLinkPreAuth

func (f FeatureSet) MagicLinkPreAuth() (PreAuthService, error)

MagicLinkPreAuth exposes selected original-flow preparation/issuance/recovery through the graph's existing lifetime and tenant guards. It selects no HTTP.

func (FeatureSet) MagicLinkRequest

func (f FeatureSet) MagicLinkRequest() (MagicLinkRequestService, error)

MagicLinkRequest returns the selected native owner without IO or startup. Calls retain graph initialization, bounded lifetime and tenant admission; normalization is a state-neutral parser and has no caller-selected tenant. Retained handles deny after Close, including recovery and normalization.

func (FeatureSet) MagicLinkTOTP

func (f FeatureSet) MagicLinkTOTP() (mfa.TOTPCompletionService, error)

MagicLinkTOTP returns the explicitly selected native TOTP completion owner. It neither exposes an HTTP route nor enrolls a factor or grants trusted-device policy. All calls retain graph startup, tenant, bounded lifetime and shutdown admission. Unselected/zero/closed graphs expose no handle; retained handles deny after Close. Recovery is original proof/code-free outcome reconciliation.

func (FeatureSet) MarshalJSON

func (FeatureSet) MarshalJSON() ([]byte, error)

func (FeatureSet) MarshalText

func (FeatureSet) MarshalText() ([]byte, error)

func (FeatureSet) OAuthWorkloads

func (f FeatureSet) OAuthWorkloads() (OAuthWorkloadService, error)

OAuthWorkloads returns the selected native handle without enabling HTTP or performing IO. It can be retained before Initialize, but its operations deny until initialization succeeds. Unselected, uncomposed and closed graphs deny.

func (FeatureSet) OTP

func (f FeatureSet) OTP() (otp.Service, error)

OTP returns the public Send interface for the selected graph. The handle may be retained before startup, but every call checks startup, tenant and lifetime. Close permanently denies even terminal replay through this graph.

func (FeatureSet) OTPSignin

func (f FeatureSet) OTPSignin() (otp.SigninService, error)

OTPSignin returns the public consuming service only when explicitly selected. It shares Send's original custody and this graph's startup, tenant allowlist and bounded lifetime. Retained handles deny after Close. No route, listener, migration or implicit startup is enabled by obtaining a handle.

func (FeatureSet) OTPSigninSource

func (f FeatureSet) OTPSigninSource() (otp.SigninSourceService, error)

OTPSigninSource returns code-free original-source discovery only for selected OTP signin. It shares that same native owner and graph lifetime; no reader, route or storage callback is supplied by the application. Discovery grants no login authority and its sensitive projection must never reach a client.

func (FeatureSet) OrganizationInvitations

func (f FeatureSet) OrganizationInvitations() (*OrganizationInvitationService, error)

OrganizationInvitations returns the selected native invitation owner without enabling HTTP or exposing capability/delivery stores.

func (FeatureSet) Organizations

func (f FeatureSet) Organizations() (*OrganizationService, error)

Organizations returns the selected authenticated organization owner. It performs no IO and never enables HTTP.

func (FeatureSet) PasskeyTOTP

func (f FeatureSet) PasskeyTOTP() (mfa.TOTPCompletionService, error)

PasskeyTOTP returns only explicitly selected original-passkey/TOTP completion. It cannot fall back to password, magic-link or known-empty authentication. Startup, tenant and shutdown guards also apply to retained handles; selecting this owner enables no HTTP route, enrollment or trusted-device policy.

func (FeatureSet) Passkeys

func (f FeatureSet) Passkeys() (*PasskeyService, error)

Passkeys returns only explicitly selected native passkey operations. It enables no route or browser UI and performs no IO. A handle can be retained before initialization, but operations require successful graph startup.

func (FeatureSet) PasswordChange

func (f FeatureSet) PasswordChange() (password.ChangeService, error)

PasswordChange returns the selected native keyed bearer replacement workflow. Calls require initialized graph custody and an allowed tenant. The sole native transaction owns proof consumption, password replacement and session effects; this port does not retry, sign proofs or create another journal.

func (FeatureSet) PasswordOTP

func (f FeatureSet) PasswordOTP() (mfa.OTPCompletionService, error)

PasswordOTP returns only explicitly selected password-origin secondary OTP send/completion. It selects no HTTP route, enrollment or alternate-method fallback. Calls retain graph startup, tenant, cancellation and shutdown admission; retained handles deny after Close, including historical recovery.

func (FeatureSet) PasswordPreAuth

func (f FeatureSet) PasswordPreAuth() (PreAuthService, error)

PasswordPreAuth returns the explicitly selected original password-flow owner. This does not select HTTP or change OTP's PreAuth profile. Native issuance owns original entropy, durable commitment and reveal-once delivery; recovery remains outcome-only. Every call retains initialized graph, tenant and shutdown guards.

func (FeatureSet) PasswordRecovery

func (f FeatureSet) PasswordRecovery() (mfa.RecoveryCompletionService, error)

PasswordRecovery returns only explicitly selected password-primary recovery completion. Native calls retain graph startup/tenant/lifetime and shutdown admission. It enables neither HTTP nor factor enrollment or TOTP fallback.

func (FeatureSet) PasswordReset

func (f FeatureSet) PasswordReset() (password.ResetService, error)

PasswordReset returns the public request/completion/recovery owner only when selected in this sealed graph. Obtaining a handle performs no IO or startup. Every retained call checks initialization, tenant ownership and the bounded graph lifetime. Close permanently denies further operations, including replay.

func (FeatureSet) PasswordResetInspection

func (f FeatureSet) PasswordResetInspection() (password.ResetInspectionService, error)

PasswordResetInspection returns the selected read-only reset owner without IO. It preserves the same initialized tenant/graph lifetime as PasswordReset; callers gain neither a proof reservation nor permission for later completion.

func (FeatureSet) PasswordSignin

func (f FeatureSet) PasswordSignin() (password.SigninService, error)

PasswordSignin returns the selected native password-login and recovery owner. Obtaining a handle starts no IO or HTTP route. Every call requires initialized graph custody, an allowed tenant and the graph's bounded lifetime. Retained handles deny after Close, including historical recovery.

func (FeatureSet) PasswordSignup

func (f FeatureSet) PasswordSignup() (password.SignupService, error)

PasswordSignup returns the selected native registration/recovery owner. Calls retain initialized graph, tenant and shutdown admission. Registration returns a neutral acknowledgement and never issues a session in this profile.

func (FeatureSet) PasswordTOTP

func (f FeatureSet) PasswordTOTP() (mfa.TOTPCompletionService, error)

PasswordTOTP returns only the explicitly selected password-primary completion owner. It preserves graph tenant/lifetime/shutdown admission and cannot expose routes, enroll factors or substitute a magic-link primary.

func (FeatureSet) PasswordVerification

func (f FeatureSet) PasswordVerification() (password.VerificationService, error)

PasswordVerification returns explicitly selected bearer reauthentication. Calls require initialized graph custody and an allowed tenant; retained handles deny after Close. Native verification issues a bounded upstream proof, never creates/extends a session or automatically consumes the proof.

func (FeatureSet) Phone

func (f FeatureSet) Phone() (*PhoneService, error)

Phone returns the explicitly selected native owner, not an HTTP route or authentication lease. Retained handles deny after their graph is closed.

func (FeatureSet) PhoneChange

func (f FeatureSet) PhoneChange() (*PhoneChangeService, error)

PhoneChange obtains an explicitly selected native handle without IO. It enables neither HTTP nor enrollment and grants no session or proof authority.

func (FeatureSet) PhoneOTPSignin

func (f FeatureSet) PhoneOTPSignin() (PhoneOTPSigninService, error)

PhoneOTPSignin returns the explicitly selected native SMS-code workflow. Obtaining a handle does no IO. Every call retains startup, tenant, bounded cancellation and shutdown guards; retained handles deny after graph Close.

func (FeatureSet) PhoneOTPSigninPreAuth

func (f FeatureSet) PhoneOTPSigninPreAuth() (IdentifierBoundPreAuthService, error)

PhoneOTPSigninPreAuth returns the separately target-bound original SMS-login flow issuer. Canonical binding uses the exact native number policy and key, without looking up an account or claiming number possession.

func (FeatureSet) PhonePasswordReset

func (f FeatureSet) PhonePasswordReset() (*PhonePasswordResetService, error)

PhonePasswordReset obtains the explicitly selected native recovery profile without IO. No email reset, phone enrollment/signin or HTTP is selected.

func (FeatureSet) PhonePasswordResetPreAuth

func (f FeatureSet) PhonePasswordResetPreAuth() (IdentifierBoundPreAuthService, error)

PhonePasswordResetPreAuth obtains the original no-session recovery issuer with lookup-free canonical target binding. It preserves the same graph/key custody as reset and refuses an unbound Prepare; no Remember choice exists.

func (FeatureSet) PhoneRemoval

func (f FeatureSet) PhoneRemoval() (*PhoneRemovalService, error)

PhoneRemoval obtains an explicitly selected native handle without IO. It does not select HTTP, enrollment or authentication; retained handles deny on Close.

func (FeatureSet) PhoneSignin

func (f FeatureSet) PhoneSignin() (password.SigninService, error)

PhoneSignin returns the selected verified-phone native owner. It performs no implicit initialization or IO; calls retain graph startup, tenant, bounded lifetime and shutdown guards. It cannot substitute email/username authority.

func (FeatureSet) PhoneSigninPreAuth

func (f FeatureSet) PhoneSigninPreAuth() (IdentifierBoundPreAuthService, error)

PhoneSigninPreAuth returns the target-bound native phone/password issuer. Canonicalization uses exactly the selected signin owner's policy/key snapshot, performs no account lookup and retains graph lifetime/tenant admission.

func (FeatureSet) PhoneTOTP

func (f FeatureSet) PhoneTOTP() (mfa.TOTPCompletionService, error)

PhoneTOTP returns only the explicitly composed verified-phone/password TOTP completion owner. It cannot select email/username or a weaker factor. Graph startup, tenant, deadline and shutdown admission also apply to retained handles.

func (FeatureSet) PreAuth

func (f FeatureSet) PreAuth() (PreAuthService, error)

PreAuth returns original-flow initiation only when explicitly selected in OTP.PreAuth. Handles share native owners and retain startup/shutdown guards. Obtaining a handle performs no entropy, IO or implicit initialization.

func (FeatureSet) RegistrationVerification

func (f FeatureSet) RegistrationVerification() (email.RegistrationVerificationService, error)

RegistrationVerification returns the same native owner's confirmation and metadata-only recovery ports. Confirmation atomically consumes the original proof with the protected address transition; it does not issue a session.

func (FeatureSet) RegistrationVerificationSignin

func (f FeatureSet) RegistrationVerificationSignin() (email.RegistrationVerificationSigninService, error)

RegistrationVerificationSignin returns only the independently selected native original-browser registration confirmation/signin profile. Default signup, managed-address confirmation, scanner inspection and HTTP remain unchanged. Calls retain graph lifetime/tenant admission; recovery is metadata-only.

func (FeatureSet) Sessions

func (f FeatureSet) Sessions() (SessionService, error)

Sessions returns guarded native operations only when explicitly selected. Obtaining a handle starts no IO or route. Retained handles deny after Close.

func (FeatureSet) SignupPreAuth

func (f FeatureSet) SignupPreAuth() (PreAuthService, error)

SignupPreAuth returns the selected original registration-flow issuer. It freezes signup, not signin, intent using the native registration profile. Issuance and recovery retain graph startup, tenant, lifetime and shutdown guards. Obtaining a handle performs no IO and exposes no configuration.

func (FeatureSet) UsernameAvailability

func (f FeatureSet) UsernameAvailability() (username.AvailabilityService, error)

UsernameAvailability returns the selected durable advisory owner. Each call is a separately metered primary observation, never a reservation or cache.

func (FeatureSet) UsernameRegistrationVerification

func (f FeatureSet) UsernameRegistrationVerification() (email.RegistrationVerificationService, error)

UsernameRegistrationVerification returns the original username registration owner's confirmation and metadata-only recovery, independently of HTTP. Confirmation atomically consumes its original purpose-bound proof with the address transition. It never substitutes the email signup owner or signs in. Retained handles remain subject to graph startup, tenant and shutdown guards.

func (FeatureSet) UsernameRename

func (f FeatureSet) UsernameRename() (UsernameRenameService, error)

UsernameRename returns the selected native protected self-rename owner. Original proof/key/session custody and current mutation authority are native; no application store, renewed proof or alternate session engine is accepted.

func (FeatureSet) UsernameSignin

func (f FeatureSet) UsernameSignin() (password.SigninService, error)

UsernameSignin returns the distinct native username/password workflow. Without Username.TOTP, enrolled or unknown MFA state denies. The explicit TOTP selection preserves known-empty signin but returns only a challenge for an enrolled account; UsernameTOTP owns actual factor/session completion.

func (FeatureSet) UsernameSigninPreAuth

func (f FeatureSet) UsernameSigninPreAuth() (PreAuthService, error)

UsernameSigninPreAuth returns the fixed original username-signin flow issuer. Retained handles remain subject to initialized graph and shutdown admission.

func (FeatureSet) UsernameSignup

func (f FeatureSet) UsernameSignup() (password.SignupService, error)

UsernameSignup returns only the explicitly selected native email-plus-name registration owner. Calls retain startup, tenant and graph shutdown guards.

func (FeatureSet) UsernameSignupPreAuth

func (f FeatureSet) UsernameSignupPreAuth() (PreAuthService, error)

UsernameSignupPreAuth returns the fixed original username-registration flow issuer. It never substitutes the email-signup or username-signin action.

func (FeatureSet) UsernameTOTP

func (f FeatureSet) UsernameTOTP() (mfa.TOTPCompletionService, error)

UsernameTOTP returns only the explicitly selected username-origin TOTP owner. It retains graph tenant, lifetime and shutdown guards and cannot select another original primary, enroll factors or silently fall back to weaker methods.

func (FeatureSet) VerificationTOTP

func (f FeatureSet) VerificationTOTP() (mfa.TOTPCompletionService, error)

VerificationTOTP returns only explicitly selected verification-origin TOTP completion. It cannot consume a magic link/password primary or select HTTP, enrollment, recovery codes or trusted devices. Graph lifetime and tenant admission remain mandatory; retained handles deny after Close.

type HTTPAPIKeyConfiguration

type HTTPAPIKeyConfiguration struct {
	Create, Rotate, Revoke bool
	// Update independently selects exact name/permission replacement. It uses
	// the existing keyed secret-rate owner and never generates a credential.
	Update    bool
	Get, List bool
	// OrganizationOwned separately selects organization management on HTTP.
	// Native organization support alone must not expand transport authority.
	OrganizationOwned bool
	SecretNamespace   string
	SecretKey         [32]byte
	StandaloneRate    *APIKeyMetadataRateConfiguration
}

HTTPAPIKeyConfiguration selects each strict-password-bearer management route independently. Native APIKey, Session and HTTPRate are required. Mutations use the same immutable secret namespace/key as other secret integrations; changing that deployment identity resets budgets and debit correlation. Reads borrow the existing session/MFA/email/passkey safe limiter. Supply StandaloneRate only when none exists; parallel emergency budgets are rejected.

func (HTTPAPIKeyConfiguration) Format

func (HTTPAPIKeyConfiguration) Format(s fmt.State, _ rune)

func (HTTPAPIKeyConfiguration) MarshalJSON

func (HTTPAPIKeyConfiguration) MarshalJSON() ([]byte, error)

func (HTTPAPIKeyConfiguration) MarshalText

func (HTTPAPIKeyConfiguration) MarshalText() ([]byte, error)

type HTTPAnonymousConfiguration

type HTTPAnonymousConfiguration struct {
	Signin, Read, Deletion, Upgrade bool
	SecretNamespace                 string
	SecretKey                       [32]byte
}

HTTPAnonymousConfiguration selects each browser operation independently. Read extends the existing session GET with a separate unprivileged guest projection; it requires HTTPSession cookie selection. Signin adds the named anonymous original-flow method. All selected mutations require the original signed device/origin profile; Deletion and Upgrade share one native keyed secret-rate namespace/key across both routes. Omission advertises nothing.

func (HTTPAnonymousConfiguration) Format

func (HTTPAnonymousConfiguration) MarshalJSON

func (HTTPAnonymousConfiguration) MarshalJSON() ([]byte, error)

func (HTTPAnonymousConfiguration) MarshalText

func (HTTPAnonymousConfiguration) MarshalText() ([]byte, error)

type HTTPEmailAddressesConfiguration

type HTTPEmailAddressesConfiguration struct {
	Get, List bool
	// AdministrativeTargets advertises and accepts targetSubjectID only when
	// native required auditing is selected. It grants no authorization.
	AdministrativeTargets bool
	StandaloneRate        *EmailAddressStandaloneRateConfiguration
}

HTTPEmailAddressesConfiguration independently selects cookie get/list. Self reads are the default; administrative targets require explicit native auditing. Native Email.Addresses/session owners are required, not their HTTP routes. Existing safe HTTP routes share exactly one limiter/emergency budget. Leave StandaloneRate nil when one is already selected; otherwise supply it explicitly. Selecting neither operation or conflicting rate ownership fails construction.

func (HTTPEmailAddressesConfiguration) Format

Format redacts borrowed policy callbacks.

func (HTTPEmailAddressesConfiguration) MarshalJSON

func (HTTPEmailAddressesConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit deployment export.

func (HTTPEmailAddressesConfiguration) MarshalText

func (HTTPEmailAddressesConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit deployment export.

type HTTPEmailOTPChangeConfiguration

type HTTPEmailOTPChangeConfiguration HTTPEmailOTPVerificationConfiguration

HTTPEmailOTPChangeConfiguration independently selects genuine-primary OTP request/confirmation/recovery with the same explicit Origin/device/revision fields as HTTPEmailOTPVerificationConfiguration. Native Email.OTPChange, original change/notice, sessions and strong HTTPRate storage are required, not password/link/signin HTTP routes. Nil exposes no route or metadata.

func (HTTPEmailOTPChangeConfiguration) Format

Format redacts deployment details and device keys.

func (HTTPEmailOTPChangeConfiguration) MarshalJSON

func (HTTPEmailOTPChangeConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (HTTPEmailOTPChangeConfiguration) MarshalText

func (HTTPEmailOTPChangeConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export.

type HTTPEmailOTPVerificationConfiguration

type HTTPEmailOTPVerificationConfiguration struct {
	Origin         string
	Device         session.BrowserDeviceConfig
	PolicyRevision authorization.Revision
}

HTTPEmailOTPVerificationConfiguration explicitly selects authenticated self pending-email OTP Send/verification/recovery. Native Email.OTPVerification, sessions and strong HTTP rate storage are required, not their HTTP routes or OTP signin. Device is the explicit existing browser-device deployment profile; no missing device is minted by Send. Another HTTP OTP Send profile conflicts rather than silently selecting one. Nil exposes no route or metadata.

func (HTTPEmailOTPVerificationConfiguration) Format

func (HTTPEmailOTPVerificationConfiguration) MarshalJSON

func (HTTPEmailOTPVerificationConfiguration) MarshalText

type HTTPEmailRequestsConfiguration

type HTTPEmailRequestsConfiguration struct {
	VerificationSend, ChangeRequest, ChangeConfirm bool
	AddressRemove                                  bool
	Origin                                         string
	ActorID                                        identity.ActorID
	PolicyRevision                                 authorization.Revision
	// AdministrativeRemovalTargets selects targetSubjectID only for removal.
	// The native removal owner must independently select this capability.
	AdministrativeRemovalTargets bool
}

HTTPEmailRequestsConfiguration explicitly selects cookie-only keyed add/resend, change-request and/or new-address change-confirmation. Native owners are required, not their HTTP password-verification/signup routes. Origin and PolicyRevision are trusted deployment policy; ActorID is required only for change confirmation. Request routes preserve the original proof/cookie/CSRF custody. Change selects new-address proof plus required old-address notice, never old-address confirmation or automatic signin. AddressRemove separately selects native protected self-removal; no link delivery is implied.

func (HTTPEmailRequestsConfiguration) Format

Format redacts trusted deployment configuration.

func (HTTPEmailRequestsConfiguration) MarshalJSON

func (HTTPEmailRequestsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON refuses implicit configuration export.

func (HTTPEmailRequestsConfiguration) MarshalText

func (HTTPEmailRequestsConfiguration) MarshalText() ([]byte, error)

MarshalText refuses implicit text export.

type HTTPEmailSigninConfiguration

type HTTPEmailSigninConfiguration struct {
	Address        email.AddressPolicy
	ActorID        identity.ActorID
	PolicyRevision authorization.Revision
	TargetID       string
}

HTTPEmailSigninConfiguration explicitly selects email OTP Send, consuming signin and original outcome recovery. Nil selects no OTP routes or metadata. Native OTP signin, HTTP original-flow initiation, its dedicated browser-device profile and strong HTTP rate storage are required. Address is owned email normalization policy; ActorID, PolicyRevision and TargetID are trusted deployment values, not request-controlled authority. The revision must match the native Send and signin query policies, with one exact authorization handle. Audience and session cookie are taken from the selected native issuer. This HTTP profile always selects native known-empty MFA generation fencing; missing or enrolled state denies rather than relying on a permissive callback. Apply its selected MFA-authority history before serving. Existing accounts require actual owner-provisioned factor state; absence is never backfilled.

func (HTTPEmailSigninConfiguration) Format

Format redacts deployment and normalization policy.

func (HTTPEmailSigninConfiguration) MarshalJSON

func (HTTPEmailSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit runtime configuration export.

func (HTTPEmailSigninConfiguration) MarshalText

func (HTTPEmailSigninConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit runtime configuration export.

type HTTPMFAActiveStepUpConfiguration

type HTTPMFAActiveStepUpConfiguration struct {
	// Purposes explicitly selects the finite native management targets. Empty
	// retains regeneration; non-default targets must be named in the request.
	Purposes              []auth.Purpose
	TrustedOrigins        []identityhttp.Origin
	VerificationNamespace string
	VerificationKey       [32]byte
}

HTTPMFAActiveStepUpConfiguration independently selects the authenticated TOTP step-up verify arm, not enrollment or login. Native active step-up, session and shared strict rate owners are required. Origins must be exact native allowed origins; namespace/key retain stable shared quota identity.

func (HTTPMFAActiveStepUpConfiguration) Format

Format redacts rate keys and deployment policy.

func (HTTPMFAActiveStepUpConfiguration) LogValue

LogValue returns only a fixed marker.

func (HTTPMFAActiveStepUpConfiguration) MarshalJSON

func (HTTPMFAActiveStepUpConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit key/configuration export.

func (HTTPMFAActiveStepUpConfiguration) MarshalText

func (HTTPMFAActiveStepUpConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit configuration export.

type HTTPMFAConfiguration

type HTTPMFAConfiguration struct {
	TOTPVerify bool
	// PasswordTOTPVerify independently selects password-primary completion.
	// When both are selected, X-MFA-Variant: password chooses its native owner.
	PasswordTOTPVerify bool
	// UsernameTOTPVerify selects the exact username/password-origin completion.
	// Singleton X-MFA-Variant: username is required even when selected alone.
	UsernameTOTPVerify bool
	// VerificationTOTPVerify independently selects original-signup verification
	// completion, always through singleton X-MFA-Variant: verification.
	VerificationTOTPVerify bool
	// PasskeyTOTPVerify independently selects original UV-passkey plus TOTP
	// completion, always through singleton X-MFA-Variant: passkey. It neither
	// enables signin transport nor accepts another primary's continuation.
	PasskeyTOTPVerify bool
	// PasswordRecoveryUse independently selects original password recovery.
	PasswordRecoveryUse bool
	// PasswordOTPVerify independently selects the native original-send OTP owner.
	// It selects no enrollment, active step-up or alternate-method fallback.
	PasswordOTPVerify bool
	// PasswordOTPSend independently selects native keyed OTP login sending.
	PasswordOTPSend       bool
	ActorID               identity.ActorID
	PolicyRevision        authorization.Revision
	VerificationNamespace string
	VerificationKey       [32]byte
}

HTTPMFAConfiguration explicitly selects the native magic-link/TOTP completion route. It requires its actual native TOTP and original pre-auth/device graph; no enrollment, trusted-device, OTP or recovery-code route is implied. Actor and revision match the trusted primary issuance/admission policy. Namespace and key select existing strict shared verification quotas, not MFA authority. Omit configuration to expose no route, OpenAPI operation or capability.

func (HTTPMFAConfiguration) Format

func (HTTPMFAConfiguration) Format(s fmt.State, _ rune)

Format redacts deployment and rate key configuration.

func (HTTPMFAConfiguration) LogValue

func (HTTPMFAConfiguration) LogValue() slog.Value

LogValue emits only a fixed redacted marker.

func (HTTPMFAConfiguration) MarshalJSON

func (HTTPMFAConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit key export.

func (HTTPMFAConfiguration) MarshalText

func (HTTPMFAConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit export and map-key disclosure.

type HTTPMFADisableConfiguration

type HTTPMFADisableConfiguration struct {
	TrustedOrigins []identityhttp.Origin
	RateNamespace  string
	RateKey        [32]byte
}

HTTPMFADisableConfiguration independently selects native cookie-only disable. It requires actual selected disable/session/proof/rate owners, not factor- update or step-up HTTP. Trusted origins must match exact native origins.

func (HTTPMFADisableConfiguration) Format

Format redacts policy and borrowed rate-key custody.

func (HTTPMFADisableConfiguration) LogValue

LogValue exposes only a fixed redaction marker.

func (HTTPMFADisableConfiguration) MarshalJSON

func (HTTPMFADisableConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment configuration export.

func (HTTPMFADisableConfiguration) MarshalText

func (HTTPMFADisableConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key configuration export.

type HTTPMFAEnrollmentConfiguration

type HTTPMFAEnrollmentConfiguration struct {
	// ProvisioningURI explicitly adds the separate one-time disclosure route.
	ProvisioningURI bool
	// Confirmation explicitly adds authenticated code activation on the shared
	// verify route, without enabling login or session issuance.
	Confirmation          bool
	VerificationNamespace string
	VerificationKey       [32]byte
	TrustedOrigins        []identityhttp.Origin
	RateNamespace         string
	RateKey               [32]byte
	RecoveryCodes         uint32
}

HTTPMFAEnrollmentConfiguration independently selects cookie-only pending TOTP enrollment. Native enrollment, session, verification and strict shared HTTP rate owners are required. Origins must be exact members of native management policy. RecoveryCodes is 1..20; zero selects the reference default of ten. Namespace/key are stable rate identity, not signing/encryption keys. This selection does not enable login completion or imply an active factor.

func (HTTPMFAEnrollmentConfiguration) Format

Format redacts deployment policy and keys.

func (HTTPMFAEnrollmentConfiguration) LogValue

LogValue returns only a fixed marker.

func (HTTPMFAEnrollmentConfiguration) MarshalJSON

func (HTTPMFAEnrollmentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (HTTPMFAEnrollmentConfiguration) MarshalText

func (HTTPMFAEnrollmentConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text export.

type HTTPMFAFactorUpdateConfiguration

type HTTPMFAFactorUpdateConfiguration struct {
	TrustedOrigins []identityhttp.Origin
	RateNamespace  string
	RateKey        [32]byte
	// Empty selects rename only. Explicit Remove requires the selected native
	// email-recovery owner; Replace requires native pending replacement and its
	// URI/confirmation owners. Duplicates and unknown actions deny.
	Actions []mfa.FactorUpdateAction
}

HTTPMFAFactorUpdateConfiguration independently selects cookie-only native TOTP management. Native management/session/original evidence and the shared strict rate backend are required, not enrollment, login or regeneration HTTP routes. Origins are exact native origins; namespace/key preserve shared quota identity.

func (HTTPMFAFactorUpdateConfiguration) Format

Format redacts borrowed rate keys and deployment policy.

func (HTTPMFAFactorUpdateConfiguration) LogValue

LogValue emits only a fixed redaction marker.

func (HTTPMFAFactorUpdateConfiguration) MarshalJSON

func (HTTPMFAFactorUpdateConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit configuration export.

func (HTTPMFAFactorUpdateConfiguration) MarshalText

func (HTTPMFAFactorUpdateConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit configuration export.

type HTTPMFAListConfiguration

type HTTPMFAListConfiguration struct {
	StandaloneRate *MFAListStandaloneRateConfiguration
}

HTTPMFAListConfiguration independently selects GET safe MFA metadata. Native listing/session owners are required, not HTTP session/enrollment/login routes. With selected HTTP session routes, leave StandaloneRate nil: both features borrow exactly one safe limiter, including its emergency budget. Without them, supply StandaloneRate explicitly. Conflicting parallel budgets are rejected.

func (HTTPMFAListConfiguration) Format

func (HTTPMFAListConfiguration) Format(s fmt.State, _ rune)

Format redacts borrowed callbacks/deployment policy.

func (HTTPMFAListConfiguration) MarshalJSON

func (HTTPMFAListConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment configuration export.

type HTTPMFARecoveryRegenerationConfiguration

type HTTPMFARecoveryRegenerationConfiguration struct {
	TrustedOrigins []identityhttp.Origin
	RateNamespace  string
	RateKey        [32]byte
}

HTTPMFARecoveryRegenerationConfiguration independently selects cookie-only whole-set replacement, not step-up issuance, enrollment or login routes. Native replacement/session/original proof and shared strict rate owners are required. Origins must be exact native allowed origins. Namespace/key retain stable shared secret quota identity; count/freshness come from native policy.

func (HTTPMFARecoveryRegenerationConfiguration) Format

Format redacts deployment policy and rate keys.

func (HTTPMFARecoveryRegenerationConfiguration) LogValue

LogValue returns only a fixed marker.

func (HTTPMFARecoveryRegenerationConfiguration) MarshalJSON

MarshalJSON rejects implicit configuration export.

func (HTTPMFARecoveryRegenerationConfiguration) MarshalText

MarshalText rejects implicit configuration export.

type HTTPMagicLinkConfiguration

type HTTPMagicLinkConfiguration struct {
	Request, Consume      bool
	ActorID               identity.ActorID
	PolicyRevision        authorization.Revision
	VerificationNamespace string
	VerificationKey       [32]byte
}

HTTPMagicLinkConfiguration independently selects request and/or explicit consumption. Neither false is invalid: omit the selection to expose nothing. The native original-flow issuer and selected HTTPPreAuth/device/rate graph are required. ActorID equals the original issuer's trusted service actor; PolicyRevision equals native query/admission/request-key revisions. Consume requires a dedicated nonzero verification HMAC key/namespace. No routes, migration, worker or network operation starts during construction.

func (HTTPMagicLinkConfiguration) Format

Format redacts deployment rate custody.

func (HTTPMagicLinkConfiguration) MarshalJSON

func (HTTPMagicLinkConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit key export.

func (HTTPMagicLinkConfiguration) MarshalText

func (HTTPMagicLinkConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit key export.

type HTTPOAuthWorkloadConfiguration

type HTTPOAuthWorkloadConfiguration struct {
	Token, Introspect, Revoke bool
	Namespace                 string
}

HTTPOAuthWorkloadConfiguration independently opts into canonical workload token, introspection and revocation routes. At least one must be selected. Namespace obeys the HTTP OAuth rate contract; the shared strict HTTPRate backend and its MaximumDuration are reused, without a local fallback. NewServer requires the issuer's tenant-host binding to equal every selected workload tenant; native-only composition is not restricted by HTTP hosts.

func (HTTPOAuthWorkloadConfiguration) Format

func (HTTPOAuthWorkloadConfiguration) MarshalJSON

func (HTTPOAuthWorkloadConfiguration) MarshalJSON() ([]byte, error)

func (HTTPOAuthWorkloadConfiguration) MarshalText

func (HTTPOAuthWorkloadConfiguration) MarshalText() ([]byte, error)

type HTTPOrganizationConfiguration

type HTTPOrganizationConfiguration struct {
	Create, Get, MemberList, MemberAdd, MemberRemove      bool
	Update, MemberUpdate                                  bool
	InvitationGet, InvitationListMine, InvitationList     bool
	InvitationSend, InvitationAccept                      bool
	InvitationResend                                      bool
	InvitationCancel                                      bool
	InvitationExpire                                      bool
	InvitationReject                                      bool
	SlugAvailable                                         bool
	List                                                  bool
	MemberLeave                                           bool
	OwnerTransfer                                         bool
	Archive, Restore                                      bool
	TeamMemberAdd, TeamMemberRemove                       bool
	TeamListMine, TeamMemberList                          bool
	TeamCreate, TeamUpdate, TeamDelete, TeamList          bool
	RoleCreate, RoleUpdate, RoleDelete, RoleGet, RoleList bool
	PermissionCheck                                       bool
	SafeNamespace                                         string
	EmergencyMaximumKeys                                  int
	Degraded                                              func(context.Context, identityhttp.SafeRateEvent) error
	AdminNamespace                                        string
	AdminKey                                              [32]byte
	Denied                                                func(context.Context, organizationhttp.AdminRateEvent) error
	SecretNamespace                                       string
	SecretKey                                             [32]byte
}

HTTPOrganizationConfiguration opts into each bearer-only organization route independently. It requires native Organization and the shared strong HTTPRate owner; invitation selections additionally require native Invitations. Safe read degradation and administrative denial auditing are synchronous bounded callbacks with exactly the native transport contracts. Denied must durably record every rejection/unavailable event without secrets. Namespace/key changes reset effective budgets and must be coordinated across administrative routes.

func (HTTPOrganizationConfiguration) Format

Format redacts shared rate keys and deployment callbacks.

func (HTTPOrganizationConfiguration) MarshalJSON

func (HTTPOrganizationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects serialization of deployment secrets.

func (HTTPOrganizationConfiguration) MarshalText

func (HTTPOrganizationConfiguration) MarshalText() ([]byte, error)

MarshalText rejects serialization of deployment secrets.

type HTTPPasskeyConfiguration

type HTTPPasskeyConfiguration struct {
	Registration, Signin, Inventory, Discoverable bool
	// MFAContinuation selects challenge-only signin for native Passkey.TOTP.
	// It requires Signin and the actual native TOTP owner. Completion remains
	// independently selected by HTTPMFA.PasskeyTOTPVerify; no fallback is added.
	MFAContinuation bool
	// DiscoverableOnly explicitly rejects identifier-based signin and requires
	// Discoverable. It needs no email/password comparison configuration.
	DiscoverableOnly bool
	// Conditional selects native outer conditional presentation for discoverable
	// options. It requires Discoverable; no third ceremony mode or UI is enabled.
	Conditional bool
	// Signup selects original-flow passkey-first registration and a distinct
	// passkey-signup initiation method. It requires native Passkey.Signup and
	// Session.Passkey; it never substitutes an enrollment proof or password.
	Signup         bool
	Update, Delete bool
	// SessionUpdate explicitly selects the current-session UV rename profile
	// instead of password-proof Update. It requires native SessionManagement in
	// cookie mode and the graph's original CSRF keys; no device/proof owner.
	SessionUpdate bool
	// SessionDeletion selects genuine current-passkey-session UV removal and
	// current-session metadata recovery instead of password-proof Delete. It
	// requires native cookie SessionDeletion, CSRF and shared keyed rate owners.
	SessionDeletion bool
	// SessionEnrollment selects genuine current-session UV enrollment instead
	// of password-proof Registration. It requires native cookie SessionEnrollment,
	// original CSRF and keyed/rate owners, not HTTP pre-auth or a device cookie.
	SessionEnrollment             bool
	InventoryRateNamespace        string
	InventoryEmergencyMaximumKeys int
	InventoryDegraded             func(context.Context, identityhttp.SafeRateEvent) error
}

HTTPPasskeyConfiguration independently selects cookie enrollment, signin, safe self inventory, label update and deletion. Nil selects no passkey routes or metadata. Native passkeys and session owners are required. Enrollment/signin also require the signed original browser-device profile; enrollment requires both native action primaries to select cookie transport. Signin/inventory require the explicit Session.Passkey common admission. Options require Passkey.KeyedOptions. Discoverable additionally requires Signin and native risk-policy opt-in; no fallback is attempted. Update requires explicit native Management with a cookie primary and actual signed proof reader, but no browser-device ceremony. Delete requires native Deletion with a cookie primary and its actual configured reset recovery owner. Signup is a separate explicit selection requiring native signup and original pre-auth/device custody. No browser UI or MFA fallback is enabled.

Inventory reuses an existing session/MFA/email safe limiter. Only when none exists must its three explicit inventory rate settings select that owner; supplying competing settings is rejected. Degraded must finish within ctx and support concurrent calls. Mutation rates borrow the shared HTTP auth and verification identities; no consumer store or alternative workflow is accepted.

func (HTTPPasskeyConfiguration) Format

func (HTTPPasskeyConfiguration) Format(f fmt.State, _ rune)

func (HTTPPasskeyConfiguration) MarshalJSON

func (HTTPPasskeyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit deployment/callback export.

func (HTTPPasskeyConfiguration) MarshalText

func (HTTPPasskeyConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit deployment/callback export.

type HTTPPasswordProtectionConfiguration

type HTTPPasswordProtectionConfiguration struct {
	Transport      session.CredentialKind
	TrustedOrigins []identityhttp.Origin
	RateNamespace  string
	RateKey        [32]byte
}

HTTPPasswordProtectionConfiguration selects the credential channel and deployment rate identity for one protected password operation. Use separate HTTPPasswordVerification and HTTPPasswordChange selections; neither enables the other. Cookie mode requires exact HTTPS origins and native CSRF custody; bearer mode rejects origins and never falls back to cookies. Namespace and RateKey are stable independent rate identity, not credential/signing keys. Verification also requires the existing signed browser-device issuer. Native owners supply cookie, policy revision, clock and transaction bounds.

func (HTTPPasswordProtectionConfiguration) Format

Format redacts deployment rate custody.

func (HTTPPasswordProtectionConfiguration) MarshalJSON

func (HTTPPasswordProtectionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit deployment export.

func (HTTPPasswordProtectionConfiguration) MarshalText

func (HTTPPasswordProtectionConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type HTTPPasswordResetConfiguration

type HTTPPasswordResetConfiguration struct {
	ActorID               identity.ActorID
	PolicyRevision        authorization.Revision
	CallbackURL           string
	VerificationNamespace string
	VerificationKey       [32]byte
	// Inspect explicitly selects the additional read-only token inspection route.
	// False preserves the existing request/completion-only HTTP contract.
	Inspect bool
}

HTTPPasswordResetConfiguration explicitly selects both reset routes. Nil selects neither routes nor metadata. The native owner, original browser-device issuer and primary HTTP rate backend must already be selected. Actor/revision, fixed callback and independently keyed verification namespace are trusted deployment values, not request authority. The graph owns limiter shutdown.

func (HTTPPasswordResetConfiguration) Format

Format hides deployment keys and policy internals.

func (HTTPPasswordResetConfiguration) MarshalJSON

func (HTTPPasswordResetConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment-key export.

func (HTTPPasswordResetConfiguration) MarshalText

func (HTTPPasswordResetConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit textual deployment-key export.

type HTTPPasswordSigninConfiguration

type HTTPPasswordSigninConfiguration struct {
	ActorID        identity.ActorID
	PolicyRevision authorization.Revision
}

HTTPPasswordSigninConfiguration explicitly selects browser password login and the password method on shared original-flow initiation. Nil exposes neither login nor method metadata. Native password signin, its PreAuth owner, shared HTTP rate admission and original browser-device profile are required. ActorID and revision are trusted service policy; callback, keys, cookies, lifetime and audience are taken from selected native owners, never independently defaulted.

func (HTTPPasswordSigninConfiguration) Format

Format hides trusted service policy.

func (HTTPPasswordSigninConfiguration) MarshalJSON

func (HTTPPasswordSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit runtime composition export.

func (HTTPPasswordSigninConfiguration) MarshalText

func (HTTPPasswordSigninConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit runtime composition export.

type HTTPPasswordSignupConfiguration

type HTTPPasswordSignupConfiguration struct {
	ActorID        identity.ActorID
	PolicyRevision authorization.Revision
}

HTTPPasswordSignupConfiguration explicitly selects browser registration and its named signup initiation method. Nil exposes neither route nor method. The native signup/PreAuth owners, shared rate backend and original browser device profile are required. Confirmation remains independently selectable. ActorID and revision are trusted service policy, not prospective user claims.

func (HTTPPasswordSignupConfiguration) Format

Format redacts service policy.

func (HTTPPasswordSignupConfiguration) MarshalJSON

func (HTTPPasswordSignupConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit runtime configuration export.

func (HTTPPasswordSignupConfiguration) MarshalText

func (HTTPPasswordSignupConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit runtime configuration export.

type HTTPPhoneChangeConfiguration

type HTTPPhoneChangeConfiguration struct {
	Origin         string
	Device         session.BrowserDeviceConfig
	PolicyRevision authorization.Revision
}

HTTPPhoneChangeConfiguration opts into cookie-only replacement sending, completion and original recovery. PhoneChange and real proof/session/shared admission owners are required. The canonical sending route conflicts with HTTPPhoneVerification: selecting both fails rather than replacing a handler. Device is the existing signed browser profile; sending never mints one.

func (HTTPPhoneChangeConfiguration) Format

Format redacts signed browser configuration.

func (HTTPPhoneChangeConfiguration) MarshalJSON

func (HTTPPhoneChangeConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (HTTPPhoneChangeConfiguration) MarshalText

func (HTTPPhoneChangeConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration and map-key export.

type HTTPPhoneOTPSigninConfiguration

type HTTPPhoneOTPSigninConfiguration struct {
	ActorID        identity.ActorID
	PolicyRevision authorization.Revision
}

HTTPPhoneOTPSigninConfiguration explicitly selects existing-account SMS-code request, signin and original code-free recovery. Native phone OTP, HTTPPreAuth with signed browser-device custody, HTTPRate and Session are required. ActorID and PolicyRevision are trusted deployment authority, never client input. The revision and authorization owner must match native send/query policy. Cookies, audience and original-flow policy come from those actual selected owners.

func (HTTPPhoneOTPSigninConfiguration) Format

Format redacts deployment authority.

func (HTTPPhoneOTPSigninConfiguration) MarshalJSON

func (HTTPPhoneOTPSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit runtime configuration export.

func (HTTPPhoneOTPSigninConfiguration) MarshalText

func (HTTPPhoneOTPSigninConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit runtime configuration export.

type HTTPPhonePasswordResetConfiguration

type HTTPPhonePasswordResetConfiguration struct {
	ActorID        identity.ActorID
	PolicyRevision authorization.Revision
}

HTTPPhonePasswordResetConfiguration independently selects request/completion and the named phone-reset original recovery-browser method. Native recovery, HTTPPreAuth with its signed browser device and the shared strong HTTP rate backend are mandatory. Actor/revision are trusted deployment values, never body input. Nil contributes no routes or metadata and selects no fallback.

func (HTTPPhonePasswordResetConfiguration) Format

func (HTTPPhonePasswordResetConfiguration) MarshalJSON

func (HTTPPhonePasswordResetConfiguration) MarshalJSON() ([]byte, error)

func (HTTPPhonePasswordResetConfiguration) MarshalText

func (HTTPPhonePasswordResetConfiguration) MarshalText() ([]byte, error)

type HTTPPhoneRemovalConfiguration

type HTTPPhoneRemovalConfiguration struct {
	Origin         string
	PolicyRevision authorization.Revision
}

HTTPPhoneRemovalConfiguration explicitly selects cookie-only authenticated phone self-removal. Native PhoneRemoval, proof storage, session cookie policy and strong shared HTTPRate must exist; their HTTP routes are not required. Origin and PolicyRevision are trusted deployment inputs, never request claims. Nil adds neither a route nor advertised capability.

func (HTTPPhoneRemovalConfiguration) Format

Format redacts deployment selection.

func (HTTPPhoneRemovalConfiguration) MarshalJSON

func (HTTPPhoneRemovalConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (HTTPPhoneRemovalConfiguration) MarshalText

func (HTTPPhoneRemovalConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export.

type HTTPPhoneVerificationConfiguration

type HTTPPhoneVerificationConfiguration struct {
	Origin         string
	Device         session.BrowserDeviceConfig
	PolicyRevision authorization.Revision
}

HTTPPhoneVerificationConfiguration explicitly selects cookie-only native existing-account phone enrollment/verification/history. It requires native Phone, sessions, password proof storage and strong shared HTTP admission, not their HTTP routes. Device is the existing signed browser deployment profile; send never mints a device. Nil exposes no phone route or metadata.

func (HTTPPhoneVerificationConfiguration) Format

Format redacts signed device key configuration.

func (HTTPPhoneVerificationConfiguration) MarshalJSON

func (HTTPPhoneVerificationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit configuration export.

func (HTTPPhoneVerificationConfiguration) MarshalText

func (HTTPPhoneVerificationConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key configuration export.

type HTTPPreAuthConfiguration

type HTTPPreAuthConfiguration struct {
	Lifetime session.LifetimeConfig
	Device   *session.BrowserDeviceConfig
}

HTTPPreAuthConfiguration explicitly enables the original-flow HTTP route. Nil selects no route/metadata. Lifetime is the shared eventual-session policy; Device optionally selects non-authenticating correlation. Trusted origin, action, callback, cookie and policy come from the same native issuer config. Selected HTTP issuance requires its canonical five-minute flow lifetime; the direct native issuer retains its independently supported lifetime range. Construction copies key slices; callers must not mutate concurrently.

func (HTTPPreAuthConfiguration) Format

func (HTTPPreAuthConfiguration) Format(s fmt.State, _ rune)

Format redacts retained device keys and deployment policy.

func (HTTPPreAuthConfiguration) MarshalJSON

func (HTTPPreAuthConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit export of retained browser-device custody.

func (HTTPPreAuthConfiguration) MarshalText

func (HTTPPreAuthConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit export of retained browser-device custody.

type HTTPRateConfiguration

type HTTPRateConfiguration struct {
	Namespace       string
	IdentifierKey   [32]byte
	MaximumDuration time.Duration
	Timeout         time.Duration
	LockTimeout     time.Duration
	RollbackTimeout time.Duration
}

HTTPRateConfiguration selects one native PostgreSQL strong-admission owner. All durations must be explicit and within 1ms..2s. Timeout cannot exceed MaximumDuration; lock and rollback budgets cannot exceed Timeout. Namespace and IdentifierKey satisfy the HTTP owner's fixed policy contract. Construction copies inputs without IO. The caller pool must explicitly select search_path public because the native backend's schema and queries are unqualified. Concurrent input mutation during construction is forbidden.

func (HTTPRateConfiguration) Format

func (HTTPRateConfiguration) Format(s fmt.State, _ rune)

Format redacts deployment key material for all formatting verbs.

func (HTTPRateConfiguration) MarshalJSON

func (HTTPRateConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects serialization of deployment key material.

func (HTTPRateConfiguration) MarshalText

func (HTTPRateConfiguration) MarshalText() ([]byte, error)

MarshalText rejects serialization of deployment key material.

type HTTPRegistrationVerificationConfiguration

type HTTPRegistrationVerificationConfiguration struct {
	Origin                string
	ActorID               identity.ActorID
	PolicyRevision        authorization.Revision
	VerificationNamespace string
	VerificationKey       [32]byte
	// ManagedAddresses also selects managed add/resend on this same canonical
	// route using authenticated original profiles. Email.Verification is required
	// with the same complete issuer trust/replay configuration. No other email
	// HTTP operation is implied; false preserves signup-only behavior.
	ManagedAddresses bool
	// Signin explicitly selects original-browser registration verification then
	// signin. Native PasswordSignup.VerificationSignin, compatible Session and
	// HTTP signup initiation/device custody are required. ManagedAddresses cannot
	// be combined in this registration-only profile; defaults issue no session.
	Signin bool
}

HTTPRegistrationVerificationConfiguration explicitly selects registration confirmation without signup or automatic login. Native signup custody and primary atomic HTTP rate admission are required. Origin, actor and revision are trusted deployment policy; namespace and key isolate confirmation budgets. The graph owns the limiter, not the borrowed database or verification keys.

func (HTTPRegistrationVerificationConfiguration) Format

Format redacts deployment custody.

func (HTTPRegistrationVerificationConfiguration) MarshalJSON

MarshalJSON denies implicit deployment export.

func (HTTPRegistrationVerificationConfiguration) MarshalText

MarshalText denies implicit deployment export.

type HTTPSessionConfiguration

type HTTPSessionConfiguration struct {
	Transport            session.CredentialKind
	TrustedOrigins       []identityhttp.Origin
	RateNamespace        string
	EmergencyMaximumKeys int
	Degraded             func(context.Context, identityhttp.SafeRateEvent) error
}

HTTPSessionConfiguration explicitly selects session read and self-signout. Transport never falls back to another credential channel. Cookie mode requires exact HTTPS TrustedOrigins and the native CSRF owner; bearer mode rejects origins. Degraded must record each emergency rate decision within its context. One graph-owned bounded rate.safe budget serves both routes. Dependencies are borrowed and callbacks must be bounded/concurrency-safe.

func (HTTPSessionConfiguration) Format

func (HTTPSessionConfiguration) Format(s fmt.State, _ rune)

Format redacts deployment callbacks and policy.

func (HTTPSessionConfiguration) MarshalJSON

func (HTTPSessionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (HTTPSessionConfiguration) MarshalText

func (HTTPSessionConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export.

type HTTPUsernameConfiguration

type HTTPUsernameConfiguration struct {
	Signup, Signin, Availability bool
	ActorID                      identity.ActorID
	PolicyRevision               authorization.Revision
	Rename                       *HTTPPasswordProtectionConfiguration
}

HTTPUsernameConfiguration selects each username route independently. Nil exposes no route or original-flow method. Signup/Signin require the native profile, original browser-device issuer and HTTP rate owner; ActorID and PolicyRevision are trusted service policy for those anonymous entry points. Availability borrows the native durable advisory owner. Rename independently selects cookie-only protected transport with explicit origins and rate keys; the graph supplies its actual signed proof source and session cookie policy. Native TOTP continuation is selected only by Username.TOTP; absent selection preserves the known-empty profile and denies enrolled/unknown factor state.

func (HTTPUsernameConfiguration) Format

func (HTTPUsernameConfiguration) Format(s fmt.State, _ rune)

Format redacts deployment policy and rate keys.

func (HTTPUsernameConfiguration) MarshalJSON

func (HTTPUsernameConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON refuses implicit policy/key export.

func (HTTPUsernameConfiguration) MarshalText

func (HTTPUsernameConfiguration) MarshalText() ([]byte, error)

MarshalText refuses implicit policy/key export.

type IdentifierBoundPreAuthService

type IdentifierBoundPreAuthService interface {
	PreAuthService
	BindPreAuthIdentifier(context.Context, identity.TenantID, string) ([32]byte, error)
}

IdentifierBoundPreAuthService adds trusted, lookup-free canonical target binding to original-flow issuance. It is not authentication or permission. Prepare requires a nonzero binding; consumers must derive it from the intended identifier using BindPreAuthIdentifier, never accept a client's chosen digest.

type MFAEnrollmentConfiguration

type MFAEnrollmentConfiguration struct {
	Native               mfapg.TOTPEnrollmentConfig
	Primary              passwordpg.MFAEnablePrimaryConfig
	CSRFKeys             []session.CSRFKey
	AllowedOrigins       []string
	ComparisonKey        [32]byte
	ComparisonKeyVersion uint32
	// ActiveStepUp independently selects native authenticated TOTP proof issuance.
	// Primary must be absent; this graph supplies the real cookie/session owner.
	// This selects no HTTP routes or login-completion fallback.
	ActiveStepUp *mfapg.TOTPActiveStepUpConfig
	// Regeneration separately selects fresh-proof-consuming whole-set replacement.
	// Primary and Sessions must be absent; this graph supplies real native owners.
	// ActiveStepUp is required. No HTTP route is selected by this field.
	Regeneration *mfapg.RecoveryRegenerationConfig
	// FactorManagement separately selects native protected factor updates.
	// Primary/Sessions must be absent: this graph supplies real session owners.
	// ActiveStepUp is required; this field selects no HTTP routes or regeneration.
	// Email removal requires actual PasswordReset request/completion composition;
	// RemovalRecovery must be absent because this graph supplies that owner.
	FactorManagement *mfapg.FactorUpdateConfig
	// Disable independently selects native disable-purpose mutation. Primary,
	// Sessions and Recovery must be absent: the graph supplies actual owners.
	// Requires ActiveStepUp and complete selected emailed-password-reset recovery;
	// it selects no HTTP route or factor-update operation.
	Disable *mfapg.DisableConfig
	// Listing explicitly selects safe TOTP/recovery metadata through the graph's
	// existing real session owner. It selects no HTTP route or trusted devices.
	Listing bool
}

MFAEnrollmentConfiguration explicitly selects native first-factor TOTP enable, separate reveal-once provisioning and code-confirmed activation. Native.Primary and Native.Risk.Evaluation must be absent: this graph supplies its actual password verification and counted risk owners. Primary configures the existing signed reauthentication target and freshness, not another engine. CSRFKeys must match retained session synchronizers; AllowedOrigins is exact HTTPS management policy. No HTTP route is selected by this configuration.

func (MFAEnrollmentConfiguration) Format

Format redacts native cryptographic and policy custody.

func (MFAEnrollmentConfiguration) MarshalJSON

func (MFAEnrollmentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit sensitive configuration export.

func (MFAEnrollmentConfiguration) MarshalText

func (MFAEnrollmentConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit sensitive configuration export.

type MFAListStandaloneRateConfiguration

type MFAListStandaloneRateConfiguration struct {
	Namespace            string
	EmergencyMaximumKeys int
	Degraded             func(context.Context, identityhttp.SafeRateEvent) error
}

MFAListStandaloneRateConfiguration supplies safe-route policy only when no HTTP session routes are selected. The graph supplies its existing native strong backend, trusted clock and bounds. Degraded must synchronously record each emergency decision within ctx; it grants no access authority.

func (MFAListStandaloneRateConfiguration) Format

Format redacts callback/deployment policy.

type MFAOTPActiveStepUpConfiguration

type MFAOTPActiveStepUpConfiguration struct {
	Native mfapg.OTPActiveStepUpConfig
	Policy otp.AttemptPolicy
	// FactorManagement explicitly selects native OTP rename and atomic session
	// revocation. Explicit email recovery also enables sole-active-OTP removal.
	// Primary/Sessions/RemovalRecovery and replacement overrides must be nil;
	// the graph supplies the actual selected password-reset recovery owner.
	FactorManagement *mfapg.FactorUpdateConfig
	// Disable separately selects native sole-active-OTP disable and one/all
	// pending-sibling disposition. Native.AllowedPurposes must include disable.
	// Primary, Sessions and Recovery must be absent; the graph supplies real
	// owners. Email recovery and selected password reset are required. No HTTP
	// route or factor-update capability is selected by this field.
	Disable *mfapg.DisableConfig
}

MFAOTPActiveStepUpConfiguration selects native action-bound OTP proof issuance, not enrollment/login fallback or HTTP. Native.Primary/Issuance must be absent: the graph supplies actual owners. Policy is consuming-only PurposeStepUp. Delivery templates and retained keys use this same graph.

func (MFAOTPActiveStepUpConfiguration) Format

Format redacts signing and borrowed native configuration.

func (MFAOTPActiveStepUpConfiguration) MarshalJSON

func (MFAOTPActiveStepUpConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit configuration export.

func (MFAOTPActiveStepUpConfiguration) MarshalText

func (MFAOTPActiveStepUpConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit configuration export.

type MFAOTPEnrollmentConfiguration

type MFAOTPEnrollmentConfiguration struct {
	// ActiveStepUp separately selects authenticated OTP factor-update evidence;
	// it enables no HTTP route and requires selected password/OTP sessions.
	ActiveStepUp *MFAOTPActiveStepUpConfiguration
	// Listing independently selects safe native TOTP/OTP inventory. HTTP still
	// requires HTTPMFAList; selecting inventory enables no factor mutation.
	Listing           bool
	Native            mfapg.OTPEnrollmentConfig
	Primary           passwordpg.MFAEnablePrimaryConfig
	CSRFKeys          []session.CSRFKey
	AllowedOrigins    []string
	SessionKeys       map[uint32][]byte
	FreshnessLimit    time.Duration
	Policy            otp.AttemptPolicy
	AttemptKeyVersion uint32
	TemplateID        string
	TemplateVersion   uint32
	LocaleChain       []string
}

MFAOTPEnrollmentConfiguration selects native pending OTP enrollment, delivered confirmation and original recovery. It enables no HTTP route or login method. Native.Primary and Native.Risk.Evaluation must be absent: the graph supplies its actual password proof and counted risk owners. Policy must select consuming MFA challenges; templates and SessionKeys must match this graph's delivery and password-session owners. FreshnessLimit cannot renew original session custody. Configuration and borrowed dependencies must remain immutable during use.

func (MFAOTPEnrollmentConfiguration) Format

Format hides native key, session and policy custody.

func (MFAOTPEnrollmentConfiguration) LogValue

LogValue redacts startup configuration in structured logs.

func (MFAOTPEnrollmentConfiguration) MarshalJSON

func (MFAOTPEnrollmentConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit export of secret-bearing startup configuration.

func (MFAOTPEnrollmentConfiguration) MarshalText

func (MFAOTPEnrollmentConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit textual export of startup custody.

type MagicLinkConfiguration

type MagicLinkConfiguration struct {
	Request magicpg.RequestConfig
	Consume *magicpg.ConsumeConfig
	PreAuth *MagicLinkPreAuthConfiguration
	// TOTP explicitly selects login completion for the native MFA challenge arm.
	// It never selects an HTTP route or enrollment/trusted-device policy.
	TOTP *MagicLinkTOTPConfiguration
}

MagicLinkConfiguration selects native request and optional consumption, not HTTP. Request supplies versioned issuer, intent, normalization and cookie custody. Risk.Evaluation and Delivery.Owner/Renderer must be zero: the graph injects its counted risk and encrypted delivery owners. Policies use the same selected authorization service/revision. This current profile shares OTP's pre-auth and consuming session namespace; it does not use OTP authentication. PreAuth optionally selects original flow issuance with Request's exact key. Borrowed inputs/callbacks must remain immutable/concurrency-safe during use.

func (MagicLinkConfiguration) Format

func (MagicLinkConfiguration) Format(s fmt.State, _ rune)

Format redacts issuer, envelope and policy custody.

func (MagicLinkConfiguration) MarshalJSON

func (MagicLinkConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit secret-bearing configuration export.

func (MagicLinkConfiguration) MarshalText

func (MagicLinkConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit secret-bearing configuration export.

type MagicLinkConsumeService

type MagicLinkConsumeService interface {
	magiclink.ConsumptionService
	magichttp.ConsumeService
}

MagicLinkConsumeService combines native consumption/recovery and authenticated original rate-source lookup. No source metadata may be exposed to a client.

type MagicLinkPreAuthConfiguration

type MagicLinkPreAuthConfiguration struct {
	ActorID               identity.ActorID
	Origin, CallbackURL   string
	LookupKeyVersion      uint32
	AuditRetentionVersion uint64
	FlowTTL               time.Duration
	TokenSize             int
	Cookie                session.CookiePolicy
}

MagicLinkPreAuthConfiguration selects an original magic-link flow. Its cookie key version must exist in Request.CookieKeys; action and policy come from that owner. Actor, origin and callback are fixed trusted deployment bindings. Cookie, FlowTTL and TokenSize obey session.PreAuthIssuerConfig. HTTP selection requires the canonical five-minute lifetime; direct issuance may use1..10m.

func (MagicLinkPreAuthConfiguration) Format

Format redacts deployment custody.

func (MagicLinkPreAuthConfiguration) MarshalJSON

func (MagicLinkPreAuthConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment export.

func (MagicLinkPreAuthConfiguration) MarshalText

func (MagicLinkPreAuthConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit deployment export.

type MagicLinkRequestService

type MagicLinkRequestService interface {
	magiclink.RequestService
	magichttp.RequestService
}

MagicLinkRequestService combines the public native workflow and frozen normalization consumed by selected HTTP. Normalization confers no authority.

type MagicLinkTOTPCompletionConfig

type MagicLinkTOTPCompletionConfig struct {
	MaximumDuration      time.Duration
	ConfigurationID      string
	PolicyID             string
	Coordinator          kernel.CoordinatorConfig
	Issuer               capabilitypg.IssuerConfig
	Session              sessionpg.Config
	Profile              sessionpg.MagicLinkAdmissionConfig
	SessionIssuer        session.IssuerConfig
	CSRF                 session.CSRFKey
	CookieKeys           map[uint32]session.DigestKey
	Risk                 risk.ProtectedProviderAdmissionCustodyConfig
	Counters             riskpg.Config
	ComparisonKey        [32]byte
	ComparisonKeyVersion uint32
	ActiveEnvelopeKeyID  string
}

MagicLinkTOTPCompletionConfig selects the original magic-link/TOTP native completion profile, not HTTP or primary challenge issuance. The selected reference graph constructs it from its actual counted risk, original request owner and explicit MagicLinkTOTPConfiguration; authority profiles are not independently overridden by consumers. ComparisonKey is independent versioned cryptographic comparison custody, never derived from a factor secret. Retain CookieKeys for every live original browser flow. Inputs/providers are borrowed immutable, bounded and concurrent- safe; no constructor callback, IO, bootstrap or background work is performed. This profile does not select enrollment, trusted devices or TOTP transport.

func (MagicLinkTOTPCompletionConfig) Format

Format redacts signing, session, envelope and comparison-key custody.

func (MagicLinkTOTPCompletionConfig) LogValue

LogValue redacts all native key/policy configuration.

func (MagicLinkTOTPCompletionConfig) MarshalJSON

func (MagicLinkTOTPCompletionConfig) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit secret-bearing configuration export.

func (MagicLinkTOTPCompletionConfig) MarshalText

func (MagicLinkTOTPCompletionConfig) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key configuration export.

type MagicLinkTOTPConfiguration

type MagicLinkTOTPConfiguration struct {
	MaximumDuration           time.Duration
	ConfigurationID, PolicyID string
	Counters                  riskpg.Config
	RiskKeys                  []risk.EvidenceKey
	ComparisonKey             [32]byte
	ComparisonKeyVersion      uint32
	ActiveEnvelopeKeyID       string
}

MagicLinkTOTPConfiguration selects native login completion, not HTTP, enrollment or trusted devices. The graph injects its original request issuer, coordinator, session profile, browser keys and counted provider evaluator; callers cannot substitute those authority owners. Counters must use the same durable risk namespace/policy as the graph. ComparisonKey is independent, versioned code-comparison custody; ActiveEnvelopeKeyID selects session-output encryption. MaximumDuration is bounded by the selected primary/session graph. ConfigurationID and PolicyID pin completion semantics. Resources and callbacks remain borrowed and concurrency-safe; construction has no IO or goroutines.

func (MagicLinkTOTPConfiguration) Format

Format prevents configuration key and correlated-profile disclosure.

func (MagicLinkTOTPConfiguration) LogValue

LogValue emits only a fixed redacted marker.

func (MagicLinkTOTPConfiguration) MarshalJSON

func (MagicLinkTOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit comparison/envelope/risk key export.

func (MagicLinkTOTPConfiguration) MarshalText

func (MagicLinkTOTPConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key custody export.

type ManagedEmailService

type ManagedEmailService struct {
	// contains filtered or unexported fields
}

ManagedEmailService is a graph-lifetime-bound native email handle, not a repository, credential validator or independently committable workflow. The selected getter fixes verification-send versus change-request. Methods for the other profile deny; calls preserve native proof, recovery and outcome semantics and are bounded by graph/caller/native deadlines. Zero denies.

func (*ManagedEmailService) ChangeConfirm

ChangeConfirm delegates original new-address-confirmed primary change.

func (*ManagedEmailService) ChangeConfirmationRateSource

func (s *ManagedEmailService) ChangeConfirmationRateSource(ctx context.Context, p capability.Proof, callback string, caller authorization.DecisionContext) (identity.UserID, string, time.Duration, error)

ChangeConfirmationRateSource preserves the distinct original change action.

func (*ManagedEmailService) ChangeRecover

ChangeRecover preserves original change metadata; it never repeats effects.

func (*ManagedEmailService) ChangeRequest

ChangeRequest attaches the selected native candidate, not a completed swap.

func (*ManagedEmailService) ChangeRequestKeyed

ChangeRequestKeyed creates one original pending change candidate, not a swap. It is available only on the selected change handle with keyed composition.

func (*ManagedEmailService) ChangeRequestRecover

ChangeRequestRecover observes the exact original candidate request metadata.

func (ManagedEmailService) Format

func (ManagedEmailService) Format(s fmt.State, _ rune)

Format redacts retained graph and native credential/key custody.

func (ManagedEmailService) LogValue

func (ManagedEmailService) LogValue() slog.Value

LogValue emits no graph or credential metadata.

func (*ManagedEmailService) ManagedVerificationRateSource

func (s *ManagedEmailService) ManagedVerificationRateSource(ctx context.Context, p capability.Proof, callback string, caller authorization.DecisionContext) (identity.UserID, string, time.Duration, error)

ManagedVerificationRateSource preserves exact verification-only provenance.

func (ManagedEmailService) MarshalJSON

func (ManagedEmailService) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit runtime export.

func (ManagedEmailService) MarshalText

func (ManagedEmailService) MarshalText() ([]byte, error)

MarshalText denies implicit runtime text export.

func (*ManagedEmailService) ReadChangeOrigin

ReadChangeOrigin exposes native original change custody under the selected graph lifetime and current exact disclosure policy. This trusted workflow port is not HTTP inspection, session authentication or replacement authorization; no delivered link or new proof is required and no original times are renewed.

func (*ManagedEmailService) ReadManagedVerification

ReadManagedVerification authenticates original intent without consuming it.

func (*ManagedEmailService) RequestRateSourceKeyed

RequestRateSourceKeyed authenticates native subject/destination rate metadata before mutable session lookup. Both values are sensitive and must not be logged or disclosed. It does not allocate durable request state, assess providers, issue links, charge counters or grant current mutation/session authority. Exact retries preserve original possession and retain the native input/clock provenance. It requires selected keyed composition and the graph lifetime.

func (*ManagedEmailService) ValidateManagedVerification

func (s *ManagedEmailService) ValidateManagedVerification(ctx context.Context, p capability.Proof, callback string, caller authorization.DecisionContext) (bool, error)

ValidateManagedVerification is a non-consuming bounded current-state read.

func (*ManagedEmailService) VerificationConfirm

VerificationConfirm delegates explicit protected one-use verification.

func (*ManagedEmailService) VerificationRecover

VerificationRecover preserves native original verification reconciliation.

func (*ManagedEmailService) VerificationResend

VerificationResend preserves native cooldown and predecessor supersession.

func (*ManagedEmailService) VerificationResendKeyed

VerificationResendKeyed retains the existing pending target and cooldown. It requires selected keyed verification, an empty command ID and exact target.

func (*ManagedEmailService) VerificationSend

VerificationSend preserves native original-password admission, issuance and delivery under the graph's lifetime. A change-selected handle cannot use it.

func (*ManagedEmailService) VerificationSendKeyed

VerificationSendKeyed selects original-input correlation when explicitly configured. Command/address IDs must be empty. It preserves native atomic proof, issuance, delivery and retry semantics; missing keyed selection denies.

func (*ManagedEmailService) VerificationSendRecover

VerificationSendRecover observes original metadata without historical proof.

type MigrationApplyPolicy

type MigrationApplyPolicy struct {
	TenantID       identity.TenantID
	ActorID        identity.ActorID
	LookupKey      [32]byte
	LockTimeout    time.Duration
	CleanupTimeout time.Duration
}

MigrationApplyPolicy enables explicit offline operator migrations. Scope and LookupKey are trusted deployment inputs, not request-supplied authorization. LookupKey is a nonzero stable secret retained across retries/reconstruction; replacing it cannot rebind an existing command. Native command records must remain retained while resume/reconciliation is possible (no automatic TTL). LockTimeout defaults to 30s; explicit values are 1s..5m. CleanupTimeout is positive and at most one minute. PrimaryTimeout bounds the entire operation, independently of the lock budget. Construction copies this value; callers must not mutate input concurrently. Diagnostic projections redact the key.

func (MigrationApplyPolicy) Format

func (p MigrationApplyPolicy) Format(s fmt.State, _ rune)

Format redacts every formatting verb, including structural diagnostics.

func (MigrationApplyPolicy) GoString

func (p MigrationApplyPolicy) GoString() string

GoString redacts operator policy and secret custody.

func (MigrationApplyPolicy) LogValue

func (p MigrationApplyPolicy) LogValue() slog.Value

LogValue deliberately exports no operator scope or key.

func (MigrationApplyPolicy) MarshalJSON

func (MigrationApplyPolicy) MarshalJSON() ([]byte, error)

MarshalJSON deliberately exports no operator scope or key.

func (MigrationApplyPolicy) String

func (MigrationApplyPolicy) String() string

String redacts operator policy and secret custody.

type MigrationApplyResult

type MigrationApplyResult struct {
	// contains filtered or unexported fields
}

MigrationApplyResult is an immutable public projection of native authority. Copies share no mutable slices with the owner; zero is invalid. At most 128 sorted owner receipts are returned. It cannot authorize resume by itself.

func (MigrationApplyResult) CommandID

func (r MigrationApplyResult) CommandID() identity.CommandID

CommandID returns the original stable command, including unknown outcomes.

func (MigrationApplyResult) Digest

func (r MigrationApplyResult) Digest() [32]byte

Digest returns the bound complete original plan digest.

func (MigrationApplyResult) Receipts

Receipts returns detached sorted command-attributed contributor progress.

func (MigrationApplyResult) State

State returns the execution/reconciliation classification; zero is invalid.

type MigrationApplyState

type MigrationApplyState uint8

MigrationApplyState is a closed execution/recovery classification. Zero is invalid, not success. Pending may contain a durable prefix; only Applied means the complete original plan has native attribution and current validity.

const (
	// MigrationApplied means all selected batches are durably attributed.
	MigrationApplied MigrationApplyState = iota + 1
	// MigrationApplyPending means an incomplete command can be retried exactly.
	MigrationApplyPending
	// MigrationApplyDirty denies execution until explicit native recovery.
	MigrationApplyDirty
	// MigrationApplyIncompatible denies drift, unowned state or changed plans.
	MigrationApplyIncompatible
	// MigrationApplyLocked means bounded ownership acquisition timed out.
	MigrationApplyLocked
	// MigrationApplyUnknown requires authoritative same-command reconciliation.
	MigrationApplyUnknown
)

type MigrationCompatibility

type MigrationCompatibility uint8

MigrationCompatibility is the closed relationship between an owned source and its authoritative native history. Zero is invalid.

const (
	// MigrationCompatible means every required step is clean and identity-matched.
	MigrationCompatible MigrationCompatibility = iota + 1
	// MigrationRequired means an original forward suffix is not installed.
	MigrationRequired
	// MigrationIncompatible means history drift or unmanaged owned objects.
	MigrationIncompatible
	// MigrationDirty means a recognized step has an unresolved native outcome.
	MigrationDirty
)

type MigrationContributorReceipt

type MigrationContributorReceipt struct {
	Module  ModuleID
	Version uint64
}

MigrationContributorReceipt is public progress metadata, never execution authority. Version is the maximum command-attributed original native version across this owner's participating histories, not a merged sequence. Native namespace-qualified receipts remain authority. No private digest escapes.

type MigrationError

type MigrationError struct {
	// contains filtered or unexported fields
}

MigrationError preserves migration state and a safe identity/context error. Driver diagnostics never cross this boundary. Unknown always unwraps to the original identity.UnknownCommitError, never inferred success or rollback.

func (MigrationError) Error

func (MigrationError) Error() string

Error returns only a stable diagnostic without database/provider payloads.

func (MigrationError) State

State returns the distinguished migration failure class.

func (MigrationError) Unwrap

func (e MigrationError) Unwrap() error

Unwrap exposes only a safe typed identity or context classification.

type MigrationPlan

type MigrationPlan struct {
	BaseLedgerDigest [32]byte
	CatalogDigest    [32]byte
	Modules          []ModuleVersion
	Steps            []MigrationStep
	Digest           [32]byte
}

MigrationPlan is a detached canonical snapshot, not execution authority. Modules and Steps are caller-owned copies. Treat the value as immutable; changing any field invalidates Digest. Apply must independently rediscover and validate the complete value before writes. A nonzero digest with no steps represents a valid no-op; the zero value is invalid.

type MigrationPolicy

type MigrationPolicy struct {
	LockTimeout, CommandRetention time.Duration
	ApplyOnStartup                bool
}

MigrationPolicy supplies explicit deployment bounds. Ordinary serving never applies migrations on startup; use StoreSet's separate Check/Plan/Apply APIs.

type MigrationStep

type MigrationStep struct {
	Owner        ModuleID
	ID           string
	FromVersion  uint64
	ToVersion    uint64
	SourceDigest [32]byte
	StepDigest   [32]byte
}

MigrationStep identifies one native forward migration without exposing SQL. FromVersion is the owner's preceding version within the physical history identified by SourceDigest, not another owner or another independent history. SourceDigest binds the complete participating physical source.

type ModuleID

type ModuleID string

ModuleID identifies a selected canonical migration owner, not a database or ledger name. Unknown, unselected, duplicate and empty IDs are invalid.

type ModuleMigrationStatus

type ModuleMigrationStatus struct {
	Module          string
	CurrentVersion  uint64
	RequiredVersion uint64
	Compatibility   MigrationCompatibility
}

ModuleMigrationStatus contains only public owner/version metadata. It is a discovery snapshot, not permission to apply or a guarantee of future health. Versions are maxima across selected native histories. Compatibility, not numeric equality, establishes completeness of a multi-history owner.

type ModuleVersion

type ModuleVersion struct {
	Module  string
	Version uint64
}

ModuleVersion is an authoritative current version, including zero for an empty owner history. It is never a caller-supplied planning target.

type OAuthWorkloadConfiguration

type OAuthWorkloadConfiguration struct {
	Protocol                           oauth.Config
	Schema                             string
	GlobalAuthorityID, PolicyNamespace string
	BootstrapTenantIDs                 []identity.TenantID
	TokenKeys                          []oauth.TokenDigestKey
	ActiveTokenKeyVersion              uint32
	IntentKey                          [32]byte
	ActiveEnvelopeKeyID                string
	Coordinator                        kernel.CoordinatorConfig
	RequestKeys                        kernel.RequestKeyConfig
	PolicyID                           string
	Counters                           riskpg.Config
}

OAuthWorkloadConfiguration selects configured confidential Basic clients only. Native OAuth retains protocol, credential, transaction, audit/outbox and current-authority ownership. Session, managed clients, exchange, OIDC and device selections are unsupported; they are never silently enabled.

BootstrapTenantIDs is an explicit immutable directory declaration, not an inference from admission scopes. Every workload tenant must be declared and present in DurableAdmission.Tenants. Protected counters use the same physical risk schema. Clocks in Protocol, Coordinator and RequestKeys must be the real clock.System value; production composition accepts no test clock override. PolicyNamespace must be exclusive to service-account subjects: the public authorization scope deliberately has no subject-kind discriminator.

Remaining fields retain oauth/postgres.Config's bounds, key-retention and primary-pool obligations. EnvelopeKeys must be a nonnil *keyring.Provider. Construction copies configuration; concurrent caller mutation is forbidden.

func (OAuthWorkloadConfiguration) Format

func (OAuthWorkloadConfiguration) MarshalJSON

func (OAuthWorkloadConfiguration) MarshalJSON() ([]byte, error)

func (OAuthWorkloadConfiguration) MarshalText

func (OAuthWorkloadConfiguration) MarshalText() ([]byte, error)

type OAuthWorkloadService

type OAuthWorkloadService struct {
	// contains filtered or unexported fields
}

OAuthWorkloadService is the selected native workload interface behind the sealed graph's initialization, cancellation and shutdown boundary. Copies share one lifetime and are safe for concurrent calls. It owns no pool or goroutine. Requests retain native OAuth ownership, credential-custody and trusted transport-attribution obligations; input mutation during a call is forbidden. Successful credentials belong to the caller, never to a logger. Zero is invalid. Retained handles permanently deny after StoreSet.Close.

func (OAuthWorkloadService) Format

func (OAuthWorkloadService) Format(s fmt.State, _ rune)

Format redacts graph internals and correlated deployment custody.

func (OAuthWorkloadService) Introspect

Introspect performs the native owning-client primary read within this graph's lifetime. It returns no cacheable authority or renewed freshness evidence.

func (OAuthWorkloadService) MarshalJSON

func (OAuthWorkloadService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit runtime-custody export.

func (OAuthWorkloadService) MarshalText

func (OAuthWorkloadService) MarshalText() ([]byte, error)

MarshalText rejects implicit runtime-custody export.

func (OAuthWorkloadService) Revoke

Revoke retains the native client's authorization, atomic effects, unknown- outcome and indistinguishable unknown-token semantics, bounded by shutdown.

func (OAuthWorkloadService) Token

Token invokes the existing configured workload issuer. Earlier caller deadlines win, Close cancels the call, and native committed/unknown outcomes remain unchanged. Errors are not proof that a previously attempted command rolled back; consume only the native result's declared outcome.

type OTPPreAuthConfiguration

type OTPPreAuthConfiguration struct {
	ActorID               identity.ActorID
	Origin, CallbackURL   string
	LookupKeyVersion      uint32
	AuditRetentionVersion uint64
	FlowTTL               time.Duration
	TokenSize             int
	Cookie                session.CookiePolicy
}

OTPPreAuthConfiguration selects one trusted original-flow profile. Action, policy and native namespace come from the selected OTP owner, not a second configuration. Origin/CallbackURL are fixed deployment allowlist values; empty callback disables redirect. LookupKeyVersion selects an exact retained OTP pre-auth cookie key. FlowTTL is 1..10 minutes, TokenSize 32..64 and Cookie must be the secure __Host-identity_flow policy. ActorID is a service identity, never the future authenticated user. No constructor performs IO.

func (OTPPreAuthConfiguration) Format

func (OTPPreAuthConfiguration) Format(s fmt.State, _ rune)

Format redacts trusted deployment profile values for every formatting verb.

func (OTPPreAuthConfiguration) MarshalJSON

func (OTPPreAuthConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prevents implicit deployment configuration disclosure.

func (OTPPreAuthConfiguration) MarshalText

func (OTPPreAuthConfiguration) MarshalText() ([]byte, error)

MarshalText prevents implicit configuration disclosure, including map keys.

type OTPSendConfiguration

type OTPSendConfiguration struct {
	// BootstrapTenantIDs is the explicit immutable 0..256-entry directory set.
	// Empty bootstraps no tenants and grants no tenant authority. It is never
	// inferred from velocity scopes or users. Retain it after migration apply;
	// later onboarding uses the owning lifecycle APIs, not edited migrations.
	BootstrapTenantIDs            []identity.TenantID
	Store                         otppg.ContributorConfig
	Codec                         otppg.AttemptCodecConfig
	Session                       *otppg.SessionAdmissionConfig
	Coordinator                   kernel.CoordinatorConfig
	RequestKeys                   kernel.RequestKeyConfig
	Policy                        otp.AttemptPolicy
	TemplateID                    string
	TemplateVersion               uint32
	LocaleChain                   []string
	ProviderVersion               uint64
	PolicyID                      string
	PolicyVersion                 uint64
	PreAuthAction                 string
	IntentKey, IdentifierKey      [32]byte
	Timeout                       time.Duration
	RiskTimeout, AuditTimeout     time.Duration
	RiskPolicyID, ConfigurationID string
	RiskKeys                      []risk.EvidenceKey
	// Signin explicitly enables the native single-factor consuming workflow.
	// Nil exposes Send only. Supply current admission/query policy, independent
	// session/CSRF keys and the matching deployment authority namespace. The
	// selected session namespace may share the pre-auth or authenticated store.
	// Additional-factor policy must deny until the MFA profile is composed.
	// HTTPEmailSignin additionally selects native known-empty generation fencing
	// even if the supplied native config retains policy-only compatibility mode.
	Signin *otppg.SigninConfig
	// PreAuth explicitly enables original flow initiation. Nil preserves the
	// existing externally initiated Send profile without exposing an issuer.
	PreAuth *OTPPreAuthConfiguration
}

OTPSendConfiguration selects the native public Send workflow. It has the same bounds and retained-key obligations as otp/postgres.SendConfig, except risk, templates and delivery custody are owned once by this graph. Risk uses Velocity's exact policy/key history, real wall time and the native router. ConfigurationID versions the retained admission semantics; change it when those semantics change. RiskTimeout/AuditTimeout are 1ms..5s, with audit inside risk and risk inside Timeout. Only velocity-only profiles are supported in this development composition; no missing source gets an allow-all default.

func (OTPSendConfiguration) Format

func (OTPSendConfiguration) Format(s fmt.State, _ rune)

func (OTPSendConfiguration) MarshalJSON

func (OTPSendConfiguration) MarshalJSON() ([]byte, error)

func (OTPSendConfiguration) MarshalText

func (OTPSendConfiguration) MarshalText() ([]byte, error)

type OrganizationConfiguration

type OrganizationConfiguration struct {
	Core                 organization.Config
	Repository           organizationpg.Config
	Counters             riskpg.Config
	Custody              organizationpg.OperationCustodyConfig
	ConfigurationID      string
	SelectOrganizationID func(context.Context) (organization.ID, error)
	Invitations          *OrganizationInvitationConfiguration
	OwnerTransfer        *OrganizationOwnerTransferConfiguration
	Lifecycle            *OrganizationLifecycleConfiguration
	// DirectRoleBindings selects native keyed assignment/natural revocation and
	// its independent optional migration history. Core.DynamicRoles is required;
	// neither team bindings nor HTTP binding mutations are enabled by this flag.
	DirectRoleBindings bool
	// TeamRoleBindings selects native keyed team assignment/natural revocation
	// and its separate lookup history. Core.DynamicRoles.TeamBindingsVersion 1
	// is required. Direct binding operations and HTTP mutations stay independent.
	TeamRoleBindings bool
}

OrganizationConfiguration opts into native explicit-organization membership over this graph's current verified-password bearer sessions. It enables no HTTP or domain proofs. Core.Teams explicitly selects native teams; LifecycleVersion 1 additionally selects exact reads, rename and terminal deletion after the forward migrations. Teams grant no organization role. Core.DynamicRoles explicitly selects native custom permissions; its immutable catalog is shared exactly with the native contributor. TeamBindingsVersion1 additionally requires selected team lifecycle and its native binding schema. OwnerTransfer and Lifecycle independently select their native password-proof profiles, never HTTP routes. Core.Clock must be nil; the graph supplies its system clock. Counters selects protected PostgreSQL command admission in the existing risk schema, not a replacement risk evaluator. Custody retains the native original-key encryption profile. ConfigurationID and bounded, concurrent-safe ID callbacks must remain stable for original recovery. Change the configuration ID for material policy changes.

func (OrganizationConfiguration) Format

func (OrganizationConfiguration) Format(s fmt.State, _ rune)

Format redacts retained keys and deployment configuration.

func (OrganizationConfiguration) MarshalJSON

func (OrganizationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects serialization of deployment secrets.

func (OrganizationConfiguration) MarshalText

func (OrganizationConfiguration) MarshalText() ([]byte, error)

MarshalText rejects serialization of deployment secrets.

type OrganizationInvitationConfiguration

type OrganizationInvitationConfiguration struct {
	Policy                         organization.InvitationConfig
	Issuer                         issuerpg.IssuerConfig
	Preparation                    issuerpg.IssuancePreparationConfig
	ConfigurationID                string
	SelectInvitationID             func(context.Context) (organization.ID, error)
	TemplateID                     string
	TemplateVersion                uint32
	PolicyVersion, ProviderVersion uint64
	LocaleChain                    []string
	Endpoint                       string
	ScopeKey                       [32]byte
}

OrganizationInvitationConfiguration additionally selects genuine intended- recipient invitations. Issuer and Preparation retain native capability keys; their clocks must be nil for graph injection. Delivery uses the graph's owned queue, templates and selected provider/policy versions. The supplied endpoint and scope key retain the native purpose/recipient/organization-bound link. No application contributor, store, renderer or workflow is accepted.

func (OrganizationInvitationConfiguration) Format

Format redacts capability and delivery deployment configuration.

func (OrganizationInvitationConfiguration) MarshalJSON

func (OrganizationInvitationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects serialization of capability and delivery secrets.

func (OrganizationInvitationConfiguration) MarshalText

func (OrganizationInvitationConfiguration) MarshalText() ([]byte, error)

MarshalText rejects serialization of capability and delivery secrets.

type OrganizationInvitationService

type OrganizationInvitationService struct {
	// contains filtered or unexported fields
}

OrganizationInvitationService exposes selected native invitation operations. It owns no provider, journal or lifetime separate from this graph. Copies share immutable configuration; independent calls are concurrent-safe.

func (*OrganizationInvitationService) Cancel

Cancel uses native exact-version manager cancellation and original natural- repeat recovery. It requires no recipient credential or proof. Graph lifetime and tenant guards remain separate from current native action authority.

func (*OrganizationInvitationService) Expire

Expire uses native exact-version manager expiry and original-history reconciliation. Registered reasons, current manager/session authority and atomic proof invalidation remain native; graph tenant/lifetime guards apply.

func (OrganizationInvitationService) Format

Format redacts borrowed invitation and capability owners.

func (*OrganizationInvitationService) Get

Get retains native owner-only current invitation disclosure.

func (*OrganizationInvitationService) List

List reads current safe invitation metadata for the authenticated organization owner. Limit and exclusive invitation-ID cursor retain the native contract; graph lifetime, configured tenant and initialization guards remain enforced.

func (*OrganizationInvitationService) ListMine

ListMine reads the authenticated verified recipient's bounded invitations.

func (OrganizationInvitationService) MarshalJSON

func (OrganizationInvitationService) MarshalJSON() ([]byte, error)

MarshalJSON prevents serialization of an owning service handle.

func (OrganizationInvitationService) MarshalText

func (OrganizationInvitationService) MarshalText() ([]byte, error)

MarshalText prevents serialization of an owning service handle.

func (*OrganizationInvitationService) PrepareAcceptance

PrepareAcceptance retains the exact native preparation across admission and execution. The returned opaque handle must be used serially, not concurrently. Admission performs no IO; Execute rejoins the graph without renewing custody.

func (*OrganizationInvitationService) RecoverAccept

RecoverAccept queries retained original scope with current authority.

func (*OrganizationInvitationService) Reject

Reject retains native intended-recipient authority, natural-repeat original outcome recovery and atomic rejection without manager or membership authority.

func (*OrganizationInvitationService) Resend

Resend retains the original initiating key, recipient and exclusive deadline through the existing native successor/delivery owner. Matching retries return original metadata only, including after later resends or acceptance. Graph lifetime and tenant guards do not replace native current security checks.

func (*OrganizationInvitationService) Send

Send uses the existing native original-key invitation/delivery owner.

type OrganizationLifecycleConfiguration

type OrganizationLifecycleConfiguration struct {
	Archive, Restore passwordpg.ActionPrimaryConfig
}

OrganizationLifecycleConfiguration selects the local native archive/restore profile using distinct real password action sources. Both must use the same explicit audience, bearer transport and no CSRF keys. Leave Core.Lifecycle zero; the graph injects its matching policy. No external cascade is selected.

func (OrganizationLifecycleConfiguration) Format

Format redacts retained primary configuration and keys.

func (OrganizationLifecycleConfiguration) MarshalJSON

func (OrganizationLifecycleConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects export of deployment custody.

func (OrganizationLifecycleConfiguration) MarshalText

func (OrganizationLifecycleConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit export of deployment custody.

type OrganizationOwnerTransferConfiguration

type OrganizationOwnerTransferConfiguration struct {
	Primary passwordpg.ActionPrimaryConfig
}

OrganizationOwnerTransferConfiguration selects native ownership transfer using this graph's real password-verification owner. Primary must select identity.organization.owner-transfer, an existing issuance audience and bearer transport with no CSRF keys. Its audience is injected into Core; callers must leave Core.OwnerTransferAudience empty to avoid competing configuration.

type OrganizationService

type OrganizationService struct {
	// contains filtered or unexported fields
}

OrganizationService exposes selected native organization operations without concrete stores. Calls join graph initialization, tenant and shutdown guards; independent calls are concurrent-safe. Recovery only reads original outcomes.

func (*OrganizationService) AddMember

AddMember preserves exact target/version intent and original-key recovery.

func (*OrganizationService) AddTeamMember

AddTeamMember delegates exact original-key admission through the selected native owner. Current team-write/session authority and protected effects stay native-owned; matching recovery never renews authority or executes again.

func (*OrganizationService) Archive

Archive delegates original-key local archive without claiming external cascade closure. The native owner retains current owner/action-proof and atomic effects.

func (*OrganizationService) AssignDynamicRole

AssignDynamicRole preserves the native original key, exact role/member epochs and current manager/session authority. Select DirectRoleBindings before use. Network is the trusted canonical client IP; this enables no HTTP mutation.

func (*OrganizationService) AssignTeamDynamicRole

AssignTeamDynamicRole preserves the native original key and exact team/role epochs under current human manager authority. Select TeamRoleBindings before use. Network is the trusted canonical client IP; no HTTP mutation is enabled.

func (*OrganizationService) CheckPermission

CheckPermission evaluates only the authenticated native member's effective custom roles at the exact organization epoch. Static management roles grant no implicit application access; selected team bindings and deny precedence remain native-owned. This selects no HTTP permission endpoint.

func (*OrganizationService) Create

Create preserves the native original initiating key and current authority.

func (*OrganizationService) CreateDynamicRole

CreateDynamicRole delegates original-key role creation and immutable catalog validation to the native owner. Graph tenant, cancellation and drain guards apply before current native authorization and atomic effects.

func (*OrganizationService) CreateTeam

CreateTeam delegates original-key creation of an empty native team. It grants no organization roles, and does not select an HTTP team-creation route. Configured tenant, initialization, bounded context and graph shutdown guards apply before the native current-authority and atomic transaction owners.

func (*OrganizationService) DeleteDynamicRole

DeleteDynamicRole delegates natural terminal deletion and current-authorized original recovery. Absence never proves success; role IDs cannot revive.

func (*OrganizationService) DeleteTeam

DeleteTeam delegates naturally repeated exact-version terminal deletion. Only native original history proves prior success; retired IDs and bindings cannot revive. Current authority and graph guards apply to every recovery.

func (OrganizationService) Format

func (OrganizationService) Format(s fmt.State, _ rune)

Format redacts borrowed graph and custody configuration.

func (*OrganizationService) Get

Get reads current explicitly scoped organization metadata.

func (*OrganizationService) GetDynamicRole

GetDynamicRole returns the selected current manager-only native snapshot, retaining native policy/session and graph lifetime/tenant guards.

func (*OrganizationService) GetLifecycle

GetLifecycle discovers current active/archived metadata only under the actual native owner's current-session/owner policy; ordinary reads still deny archive.

func (*OrganizationService) GetTeam

GetTeam returns the selected exact manager-only native snapshot. It exposes no HTTP route or reusable authority. Native team-read/session/lifecycle policy and graph initialization, tenant, cancellation and drain guards apply.

func (*OrganizationService) LeaveMember

LeaveMember delegates naturally repeatable self-leave at the exact original organization version. Native current authority, last-owner safety and original outcome recovery remain native-owned; graph tenant/drain guards apply.

func (*OrganizationService) ListDynamicRoles

ListDynamicRoles returns a bounded current native role page. No snapshot or cursor extends authority; failures disclose no partial page.

func (*OrganizationService) ListMembers

ListMembers reads the native bounded current membership page.

func (*OrganizationService) ListMyTeams

ListMyTeams returns the authenticated human's current bounded native page. It accepts no alternate subject and grants no cached authorization lease. Calls join graph tenant, initialization, cancellation and shutdown guards.

func (*OrganizationService) ListOrganizations

ListOrganizations returns the current authenticated subject's bounded native page. The native owner retains membership/policy filtering, explicit limit and cursor semantics; graph initialization, tenant and drain guards apply.

func (*OrganizationService) ListTeamMembers

ListTeamMembers delegates current native team authorization and exact organization-admission filtering, retaining bounded pagination and graph lifetime/tenant guards. Failures return no page and never extend freshness.

func (*OrganizationService) ListTeams

ListTeams returns a bounded current manager-only native page, not a cached authorization lease. Current team-read policy and graph tenant/lifetime guards remain required; failures disclose no partial page.

func (OrganizationService) MarshalJSON

func (OrganizationService) MarshalJSON() ([]byte, error)

MarshalJSON prevents serialization of an owning service handle.

func (OrganizationService) MarshalText

func (OrganizationService) MarshalText() ([]byte, error)

MarshalText prevents serialization of an owning service handle.

func (*OrganizationService) OwnerTransfer

OwnerTransfer delegates the selected native password-proof transfer. Original keyed history is recovery, never another grant; graph lifetime/tenant guards apply before reaching the native current-authority and atomic effect owners.

func (*OrganizationService) RecoverOperation

RecoverOperation reads the exact original native command, never resubmits.

func (*OrganizationService) RemoveMember

RemoveMember delegates repeat removal and native last-owner protection.

func (*OrganizationService) RemoveTeamMember

RemoveTeamMember delegates naturally repeated exact-binding removal. Only original correlated native history establishes success; missing bindings do not. Organization readmission cannot revive old team authority. The graph retains its tenant, initialization and lifetime guards on every call.

func (*OrganizationService) Restore

Restore delegates distinct-proof native restore, never reviving terminal grants.

func (*OrganizationService) RevokeDynamicRole

RevokeDynamicRole delegates natural exact-binding revocation and original recovery without caller commands or keys. DirectRoleBindings installs the optional native lookup history; absence alone never proves prior success. Native current authority and graph tenant/lifetime guards remain mandatory.

func (*OrganizationService) RevokeTeamDynamicRole

RevokeTeamDynamicRole delegates natural exact-binding revocation and original recovery without caller commands, keys or team impersonation. TeamRoleBindings selects its independent native lookup history; current human/query authority and graph lifetime/tenant guards remain mandatory. Absence is not success.

func (*OrganizationService) SlugAvailable

SlugAvailable reads advisory tenant-local occupancy through the actual native owner, preserving graph initialization, tenant and drain guards. It requires no membership and reserves no name; create/update uniqueness remains final.

func (*OrganizationService) Update

Update replaces exact-version metadata under native current administrator authority, preserving original-key recovery and graph lifetime guards.

func (*OrganizationService) UpdateDynamicRole

UpdateDynamicRole delegates original-key replacement at exact role and organization epochs. Native catalog, deny precedence and history remain owned by the native service, not a second Reference policy engine.

func (*OrganizationService) UpdateMember

UpdateMember delegates exact-version static-role replacement and native last-owner protection without renewing original command or authority custody.

func (*OrganizationService) UpdateTeam

UpdateTeam delegates original-key exact-epoch rename without changing team bindings. Native current action/session/query authority and transaction ownership remain authoritative; calls retain graph tenant/lifetime guards.

type PasskeyConfiguration

type PasskeyConfiguration struct {
	// TOTP explicitly selects enrolled-factor challenge/completion. Nil keeps
	// known-empty signin only. Selection does not enable HTTP or enrollment.
	TOTP *PasskeyTOTPConfiguration
	// Standalone selects a passkey-only graph without password, OTP or delivery
	// workflows. It disables password-proof enrollment and management, not UV,
	// native authority, risk or session checks. Nil retains the existing graph.
	Standalone *PasskeyStandaloneConfiguration
	// Signup independently selects prospective-account registration. Nil keeps
	// existing-account enrollment/signin only; it enables no HTTP capability.
	Signup *PasskeySignupConfiguration
	// KeyedOptions explicitly selects native original-key admission for both
	// enrollment and signin options. Nil preserves existing keyless behavior.
	KeyedOptions *PasskeyKeyedOptionsConfiguration
	// Management independently selects keyed self-label rename. It requires
	// KeyedOptions for the same kernel request-key owner, not another journal.
	Management *PasskeyManagementConfiguration
	// SessionManagement independently selects fresh action-bound UV rename
	// under a current passkey session. It requires KeyedOptions, not password
	// verification, and enables no HTTP routes. Nil retains existing behavior.
	SessionManagement *PasskeySessionManagementConfiguration
	// SessionEnrollment independently selects additional resident-key enrollment
	// under current passkey-session UV. It requires KeyedOptions and enables no
	// HTTP routes. Native owners retain original intent, expiry and atomicity.
	SessionEnrollment *PasskeySessionEnrollmentConfiguration
	// SessionDeletion independently selects current-session UV removal while
	// another resident key remains. It requires KeyedOptions and enables no HTTP.
	SessionDeletion *PasskeySessionDeletionConfiguration
	// Deletion independently selects signed-proof self-removal backed by this
	// graph's actual configured PasswordReset owner. It requires KeyedOptions;
	// enabling label management is not a prerequisite.
	Deletion                            *PasskeyDeletionConfiguration
	Protocol                            webauthn.Config
	RPNamespace                         string
	OptionsPrimary, RegistrationPrimary passwordpg.ActionPrimaryConfig
	Protected                           riskpg.Config
	Flow                                session.PreAuthIssuerConfig
	Issuer                              session.IssuerConfig
	CSRF                                session.CSRFKey
	Risk                                risk.AuthenticationAdmissionCustodyConfig
	IdentifierKey                       []byte
	// SessionPredecessor pins the actual installed issuance CHECK lineage.
	// Retain it for this deployment; incompatible later feature histories deny
	// instead of rewriting an already installed passkey migration checksum.
	SessionPredecessor string
}

PasskeyConfiguration explicitly selects existing-account resident UV enrollment and identified signin with Protocol's ES256/Ed25519 profile. Nil algorithms retain ES256; explicit selections preserve order. Identifier-free signin additionally requires the authentication risk policy's PasskeyDiscovery opt-in; no HTTP or signup capability is selected. With Standalone nil the graph supplies its actual password proof, authorization, coordinator, counted risk, session reader and cookie-CSRF logout owners. Both primary selections need distinct exact enrollment actions and signed proof targets in PasswordVerification. Flow and Issuer clocks and Risk.Evaluation must be absent for graph injection. Standalone instead selects signup/discovery with native session authority and no password proof or enrollment owner. Protected selects retained encryption/evidence keys and a native command counter policy matching the protected command's revision; it is distinct from anonymous authentication admission and accepts no caller store. Issuance keys/cookie must match Session read/logout policy. All borrowed configuration must remain immutable during construction.

func (PasskeyConfiguration) Format

func (PasskeyConfiguration) Format(s fmt.State, _ rune)

func (PasskeyConfiguration) MarshalJSON

func (PasskeyConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prohibits implicit export of retained startup secrets.

func (PasskeyConfiguration) MarshalText

func (PasskeyConfiguration) MarshalText() ([]byte, error)

MarshalText prohibits text/map-key export of retained startup secrets.

type PasskeyDeletionConfiguration

type PasskeyDeletionConfiguration struct {
	Primary passwordpg.ActionPrimaryConfig
}

PasskeyDeletionConfiguration selects an exact identity.passkey.delete proof. Primary CSRF keys must be absent for graph injection. Native cookie and bearer profiles remain explicit; HTTP selection separately requires cookie transport. The graph supplies its concrete PasswordReset recovery owner, not a callback asserting recovery eligibility. No signup or browser capability is enabled.

func (PasskeyDeletionConfiguration) Format

func (PasskeyDeletionConfiguration) MarshalJSON

func (PasskeyDeletionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prohibits implicit proof/deployment configuration export.

func (PasskeyDeletionConfiguration) MarshalText

func (PasskeyDeletionConfiguration) MarshalText() ([]byte, error)

MarshalText prohibits implicit proof/deployment configuration export.

type PasskeyKeyedOptionsConfiguration

type PasskeyKeyedOptionsConfiguration struct {
	// contains filtered or unexported fields
}

PasskeyKeyedOptionsConfiguration selects the existing kernel request-key owner once for passkey options. Its namespace and lookup key must remain stable while original mappings are retained. Token and CSRF keys are dedicated independent input-correlation keys, not live session/CSRF keys. The graph injects its current command-query authorization/clock/revision; applications supply no alternate store, journal or request-admission implementation. Zero is invalid. Copies share immutable opaque startup-key custody.

func NewPasskeyKeyedOptionsConfiguration

func NewPasskeyKeyedOptionsConfiguration(namespace string, lookupKey [32]byte, tokenKey session.DigestKey, csrfKey session.CSRFKey) (PasskeyKeyedOptionsConfiguration, error)

NewPasskeyKeyedOptionsConfiguration copies original-key configuration without IO or policy callbacks. Keys must be dedicated nonzero native values. The graph subsequently validates namespace/policy through the kernel owner. A closure keeps lookup material opaque even when fmt bypasses methods through an unexported caller field; configuration never grants execution authority.

func (PasskeyKeyedOptionsConfiguration) Format

func (PasskeyKeyedOptionsConfiguration) MarshalJSON

func (PasskeyKeyedOptionsConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prohibits implicit startup-key export.

func (PasskeyKeyedOptionsConfiguration) MarshalText

func (PasskeyKeyedOptionsConfiguration) MarshalText() ([]byte, error)

MarshalText prohibits implicit startup-key export.

type PasskeyManagementConfiguration

type PasskeyManagementConfiguration struct {
	Primary passwordpg.ActionPrimaryConfig
}

PasskeyManagementConfiguration selects an exact signed update proof for password-session self management. Configure its target in PasswordVerification. Primary.Action must be identity.passkey.update; CSRF keys must be absent for graph injection. Cookie and bearer native profiles remain explicit. Selection does not enable HTTP, deletion, passkey-first signup or MFA fallback.

func (PasskeyManagementConfiguration) Format

func (PasskeyManagementConfiguration) MarshalJSON

func (PasskeyManagementConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prohibits implicit deployment/proof-owner export.

func (PasskeyManagementConfiguration) MarshalText

func (PasskeyManagementConfiguration) MarshalText() ([]byte, error)

MarshalText prohibits implicit deployment/proof-owner export.

type PasskeyService

type PasskeyService struct {
	// contains filtered or unexported fields
}

PasskeyService is the guarded native existing-account reference profile. It owns no pool, transaction, protocol verifier or session store. Calls use the graph's initialized tenant and lifetime; retained handles deny after Close, including historical recovery. Browser parsing/origin/CSRF transport remains the caller's responsibility until HTTP is separately selected. Methods preserve original command custody and never remint ambiguous output.

func (*PasskeyService) AuthenticationOptions

func (f *PasskeyService) AuthenticationOptions(ctx context.Context, r native.SigninRequest) (webauthn.AssertionOptions, error)

AuthenticationOptions returns account-independent real resident UV options bound to the original identified browser attempt, never an account allowlist.

func (*PasskeyService) ConditionalAuthenticationOptions

ConditionalAuthenticationOptions selects outer conditional presentation of genuine discoverable options. Original native discovery policy, browser flow, risk, remember choice and expiry remain authoritative. Graph startup, tenant and lifetime guards are unchanged; completion uses DiscoverableSignin. This does not enable HTTP or prove browser support or actual mediation.

func (*PasskeyService) Delete

Delete delegates explicitly selected self-removal to the real signed-proof, recovery and original-key owner under graph tenant/lifetime admission. The original password session is retained for metadata-only retries; no credential or replacement recovery projection is returned, including after ambiguity.

func (*PasskeyService) DiscoverableAuthenticationOptions

func (f *PasskeyService) DiscoverableAuthenticationOptions(ctx context.Context, r native.DiscoverableSigninRequest) (webauthn.AssertionOptions, error)

DiscoverableAuthenticationOptions starts identifier-free resident UV signin only when the graph's trusted authentication risk policy enables discovery. Tenant, RP and browser-flow authority remain fixed by the selected owners.

func (*PasskeyService) DiscoverableSignin

DiscoverableSignin resolves identity only through the genuine verified credential/handle pair and atomically finalizes the original browser flow and session. It never falls back to identified or another method's signin.

func (*PasskeyService) DiscoverableSigninRateSource

DiscoverableSigninRateSource returns the genuine original anonymous-flow rate dimension without turning a flow into a user or selecting an account.

func (PasskeyService) Format

func (PasskeyService) Format(s fmt.State, _ rune)

func (*PasskeyService) Get

Get reads this profile's actual issued session with current owner authority. No other reader is tried after denial and no authentication is renewed.

func (*PasskeyService) IssueFlow

IssueFlow commits the original browser initiation, not authentication. Native preparation custody fixes the tenant; another preparation cannot replace it.

func (*PasskeyService) IssueSignupFlow

IssueSignupFlow persists only the original anonymous browser initiation. It creates no account or authenticated session; copies cannot renew custody.

func (*PasskeyService) KeyedAuthenticationOptions

KeyedAuthenticationOptions retains the original identified browser command. Matching retries cannot reveal another challenge or renew original custody.

func (*PasskeyService) KeyedConditionalAuthenticationOptions

KeyedConditionalAuthenticationOptions preserves the same original keyed discoverable command across ordinary/conditional presentation. Only the fresh acknowledged winner can reveal options; retries/recovery return native metadata without a challenge or session. No new durable mode is introduced.

func (*PasskeyService) KeyedDiscoverableAuthenticationOptions

KeyedDiscoverableAuthenticationOptions selects identifier-free original-key custody explicitly. It never tries identified signin after a denial.

func (*PasskeyService) KeyedRegistrationOptions

KeyedRegistrationOptions delegates original request custody to the selected native request-key owner. Only its fresh committed winner can reveal options; retained retries return metadata and never recreate a challenge or proof.

func (*PasskeyService) KeyedSignupOptions

KeyedSignupOptions preserves the actual native request-key mapping. Only a freshly committed winner reveals options; matching retries are metadata-only.

func (*PasskeyService) List

List returns bounded safe metadata authenticated by this selected passkey reader, not a fallback across password or other authentication methods.

func (*PasskeyService) PrepareFlow

PrepareFlow delegates entropy and remember custody to the session owner. Retain this original preparation for IssueFlow and any metadata recovery.

func (*PasskeyService) PrepareSignupFlow

PrepareSignupFlow prepares the signup session owner's original entropy and remember choice. Tenant and live graph admission precede native preparation.

func (*PasskeyService) RecoverEnrollment

RecoverEnrollment returns original outcome metadata, never a fresh challenge, credential, signed proof or permission to rerun an ambiguous command.

func (*PasskeyService) RecoverSignOut

RecoverSignOut delegates exact historical revocation metadata and current disclosure policy to the original native coordinator, not another journal.

func (*PasskeyService) RecoverSignin

RecoverSignin returns current-authorized original metadata only. It neither repeats verification nor redelivers a challenge, session or synchronizer.

func (*PasskeyService) RecoverSignup

RecoverSignup reconciles the original completion without reexecuting it or disclosing credentials. Consumed/expired flow possession is historical only.

func (*PasskeyService) RecoverSignupOptions

RecoverSignupOptions returns original durability metadata under original browser-cookie custody and current query policy, never another challenge.

func (*PasskeyService) Register

Register verifies the raw authenticator response and commits all enrollment effects through the native owner's sole Work before exposing verification.

func (*PasskeyService) RegistrationOptions

RegistrationOptions consumes an exact fresh options proof in its real native command. Retain the resulting ceremony and obtain a distinct completion proof.

func (*PasskeyService) RegistrationRateSource

RegistrationRateSource authenticates original enrollment custody for rate metadata only. It grants no permission to consume a proof or ceremony.

func (*PasskeyService) SessionDeletion

func (f *PasskeyService) SessionDeletion() (*PasskeySessionDeletionService, error)

SessionDeletion returns only the explicitly selected native removal profile. A pre-initialization handle cannot execute; nil/unselected/closed graphs deny without IO. Existing password-proof Deletion remains a separate selection.

func (*PasskeyService) SessionEnrollment

func (f *PasskeyService) SessionEnrollment() (*PasskeySessionEnrollmentService, error)

SessionEnrollment returns the explicitly selected native enrollment profile. A handle may be obtained before initialization, but cannot execute until startup succeeds. Nil/unselected/closed graphs deny without IO; no HTTP is selected.

func (*PasskeyService) SessionManagement

func (f *PasskeyService) SessionManagement() (*PasskeySessionManagementService, error)

SessionManagement returns the explicitly selected session-assertion profile. Nil selection and closed graphs deny without IO. Like Passkeys, a handle may be retained before initialization; it cannot execute until startup succeeds. The existing PasskeyService.Update remains password-proof management.

func (*PasskeyService) SignOut

SignOut performs same-transaction cookie-CSRF self-revocation. Bearer input is not enabled by this profile. Transport clearing follows native outcomes.

func (*PasskeyService) Signin

Signin returns a usable credential only after genuine protocol verification and atomic native ceremony/flow/mapping/session finalization.

func (*PasskeyService) SigninRateSource

SigninRateSource returns only the authenticated original identified rate dimension, original ceremony and immutable duration; it authenticates no user.

func (*PasskeyService) Signup

Signup verifies the actual authenticator response and atomically creates the account, credential, initial authorities, session and required lifecycle events. Only fresh acknowledged commitment permits bearer/CSRF delivery.

func (*PasskeyService) SignupOptions

SignupOptions prepares genuine resident registration without creating an account. Retain the original cookie/flow and distinct completion command.

func (*PasskeyService) SignupRateSource

SignupRateSource reads genuine original-flow/create-ceremony rate metadata through current graph admission. It authenticates no user and creates, consumes or renews no authority. Signup independently revalidates and commits.

func (*PasskeyService) Update

Update delegates explicitly selected self-label management to the native signed-proof/request-key owner. Incoming command and record overrides deny; historical retries return original metadata, not a fresh credential projection. Tenant, initialization and lifetime/drain guards match other graph operations.

type PasskeySessionDeletionConfiguration

type PasskeySessionDeletionConfiguration struct {
	Transport session.CredentialKind
	// TOTP admits only completed passkey/TOTP sessions through the selected
	// native owner. False preserves the ordinary known-empty profile.
	TOTP bool
}

PasskeySessionDeletionConfiguration selects genuine current-session UV removal while an independently usable resident key in the selected algorithm profile remains. Transport must be bearer or cookie; the graph injects original CSRF keys for cookies. KeyedOptions is required. Selection enables no HTTP or password/OTP recovery fallback.

func (PasskeySessionDeletionConfiguration) Format

Format redacts deployment selection.

func (PasskeySessionDeletionConfiguration) MarshalJSON

func (PasskeySessionDeletionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment export.

func (PasskeySessionDeletionConfiguration) MarshalText

func (PasskeySessionDeletionConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit deployment export.

type PasskeySessionDeletionService

type PasskeySessionDeletionService struct {
	// contains filtered or unexported fields
}

PasskeySessionDeletionService borrows the graph's selected native removal owner without exposing its stores or bypassing initialized graph lifetime. Calls preserve actual current-session/policy/CSRF, original-key/intent/expiry, genuine UV, transaction and recovery authority. Retained handles deny after Close. It owns no resource, proof, goroutine or automatic retry.

func (*PasskeySessionDeletionService) Delete

Delete delegates genuine UV consumption, exact key removal and affected session invalidation to the sole native Work. Success acknowledges only the original invocation; it cannot make its deliberately invalidated session usable.

func (*PasskeySessionDeletionService) DeleteOptions

DeleteOptions delegates original-key admission and genuine action-bound UV options. Retries return metadata, never another challenge or renewed lease.

func (PasskeySessionDeletionService) Format

Format excludes graph and native-owner custody.

func (PasskeySessionDeletionService) MarshalJSON

func (PasskeySessionDeletionService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit graph export.

func (PasskeySessionDeletionService) MarshalText

func (PasskeySessionDeletionService) MarshalText() ([]byte, error)

MarshalText rejects implicit graph export.

func (*PasskeySessionDeletionService) RecoverDelete

RecoverDelete delegates original command/target durability lookup under a currently valid same-user passkey session and delete policy. After removal, sign in with the surviving key. Recovery repeats no mutation or assertion, returns no credential and never renews original authority or options.

type PasskeySessionEnrollmentConfiguration

type PasskeySessionEnrollmentConfiguration struct {
	Transport session.CredentialKind
	// TOTP requires the selected native passkey/TOTP owner and admits only
	// completed passkey/TOTP sessions. False preserves known-empty admission.
	TOTP bool
}

PasskeySessionEnrollmentConfiguration selects genuine current-session UV for adding a resident key, without password proofs. Transport must be exactly bearer or cookie; the graph supplies original synchronizer keys for cookies. KeyedOptions is required for original A/B custody. Native selection enables no HTTP, rename, deletion or fallback. Borrowed runtime resources remain graph-owned.

func (PasskeySessionEnrollmentConfiguration) Format

Format redacts deployment selection.

func (PasskeySessionEnrollmentConfiguration) MarshalJSON

MarshalJSON rejects implicit deployment export.

func (PasskeySessionEnrollmentConfiguration) MarshalText

MarshalText rejects implicit deployment export.

type PasskeySessionEnrollmentService

type PasskeySessionEnrollmentService struct {
	// contains filtered or unexported fields
}

PasskeySessionEnrollmentService is a guarded view of the graph's selected native additional-enrollment owner. It owns no resources or proof. Calls retain initialized fixed-tenant graph lifetime and the earlier caller/native deadlines. Actual session, self-user intent, CSRF, genuine UV, original expiry, transaction and retry authority remain native-owned. Retained handles deny after Close.

func (*PasskeySessionEnrollmentService) EnrollmentAssertionOptions

EnrollmentAssertionOptions delegates A's original-key options to the native owner. Only fresh committed output reveals a challenge; retries are metadata.

func (PasskeySessionEnrollmentService) Format

Format excludes graph and native-owner custody.

func (PasskeySessionEnrollmentService) MarshalJSON

func (PasskeySessionEnrollmentService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit graph export.

func (PasskeySessionEnrollmentService) MarshalText

func (PasskeySessionEnrollmentService) MarshalText() ([]byte, error)

MarshalText rejects implicit graph export.

func (*PasskeySessionEnrollmentService) Register

Register delegates C's genuine registration and original command ID, without an idempotency key or replacement session. The native owner atomically creates protocol/kernel/mapping/lifecycle effects and recovers only original metadata.

func (*PasskeySessionEnrollmentService) RegistrationOptions

RegistrationOptions delegates B's genuine assertion and distinct original key. Native consumption and registration creation commit together, issuing no reusable proof or session. Preserve original intent and metadata-only retries.

func (*PasskeySessionEnrollmentService) RegistrationOptionsForDelivery

RegistrationOptionsForDelivery delegates the same B operation and returns the native owner's original A delivery ceiling alongside fresh options. Buffered transports check it after hooks with actual session/request/B validity; it is not proof or a refreshed lease. Replay/error returns zero expiry/no options.

func (*PasskeySessionEnrollmentService) SessionRegistrationRateSource

SessionRegistrationRateSource authenticates original native completion custody before challenge-rate admission. It returns metadata, not a validity lease or permission to consume. It creates/renews nothing and retains graph lifetime.

type PasskeySessionManagementConfiguration

type PasskeySessionManagementConfiguration struct {
	Transport session.CredentialKind
	TOTP      bool
}

PasskeySessionManagementConfiguration selects native action-bound UV label rename under a current passkey session. Transport must be exactly bearer or cookie; the graph supplies original CSRF keys for cookies. KeyedOptions is required. This selects neither a password proof nor HTTP, deletion, recovery or enrollment. TOTP explicitly selects completed passkey/TOTP sessions and requires Passkey.TOTP; false retains the ordinary known-empty profile. The sole existing graph owns all native stores and policies.

func (PasskeySessionManagementConfiguration) Format

Format redacts selected runtime configuration.

func (PasskeySessionManagementConfiguration) MarshalJSON

MarshalJSON rejects implicit deployment configuration export.

func (PasskeySessionManagementConfiguration) MarshalText

MarshalText rejects implicit deployment configuration export.

type PasskeySessionManagementService

type PasskeySessionManagementService struct {
	// contains filtered or unexported fields
}

PasskeySessionManagementService is a guarded view of the graph's selected native session-assertion rename owner. It owns no resources and grants no authority. Calls require graph initialization, the fixed tenant's actual current session and original intent; retained handles deny after Close. It implements the native UpdateOptions/Update contract without bypassing the graph's bounded lifetime or exposing a raw adapter handle.

func (PasskeySessionManagementService) Format

Format redacts graph and native owner custody.

func (PasskeySessionManagementService) MarshalJSON

func (PasskeySessionManagementService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit graph export.

func (PasskeySessionManagementService) MarshalText

func (PasskeySessionManagementService) MarshalText() ([]byte, error)

MarshalText rejects implicit graph export.

func (*PasskeySessionManagementService) Update

Update delegates genuine assertion verification and atomic rename to the native owner. It issues no session or reusable proof. Retain the original body/key for metadata-only retry and uncertain-outcome reconciliation.

func (*PasskeySessionManagementService) UpdateOptions

UpdateOptions delegates original-key admission and fresh UV options to the native owner. Matching retries return metadata only, never another challenge. Calls are bounded by the earlier caller, graph and native operation budgets.

type PasskeySignupConfiguration

type PasskeySignupConfiguration struct {
	Flow session.PreAuthIssuerConfig
	Risk risk.ProtectedProviderAdmissionCustodyConfig
}

PasskeySignupConfiguration selects native prospective-account signup without an email, password or caller-supplied account. Flow is a distinct original browser intent for identity.passkey.register-verify; its Clock and Risk's Evaluation must be absent for graph injection. Flow policy matches Session's execution policy. Protocol, RP, issuer, CSRF, protected counters and optional request-key custody come from the enclosing PasskeyConfiguration. Startup borrows immutable configuration; enabling signup exposes no HTTP routes.

func (PasskeySignupConfiguration) Format

func (PasskeySignupConfiguration) MarshalJSON

func (PasskeySignupConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration and key export.

func (PasskeySignupConfiguration) MarshalText

func (PasskeySignupConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration and key export.

type PasskeyStandaloneConfiguration

type PasskeyStandaloneConfiguration struct {
	BootstrapTenantIDs        []identity.TenantID
	RiskTimeout, AuditTimeout time.Duration
	RiskPolicyID              string
}

PasskeyStandaloneConfiguration selects the passkey-only deployment graph. The directory's bootstrap set is explicit and immutable; it is never inferred from configured rate scopes. Bounds retain the same native risk/audit owners as the existing deployment. AuditTimeout and RiskTimeout are 1ms..5s, with audit inside risk and risk inside Session.Native.MaximumDuration. The session operation retains its native 1ms..30s bounds. Password, OTP, delivery and password-proof management are not selected.

func (PasskeyStandaloneConfiguration) Format

func (PasskeyStandaloneConfiguration) MarshalJSON

func (PasskeyStandaloneConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment-scope export.

func (PasskeyStandaloneConfiguration) MarshalText

func (PasskeyStandaloneConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit deployment-scope export.

type PasskeyTOTPConfiguration

type PasskeyTOTPConfiguration struct {
	Challenge  native.SigninMFAConfig
	Completion MagicLinkTOTPConfiguration
}

PasskeyTOTPConfiguration selects native UV-passkey primary plus independent confirmed TOTP, not factor enrollment, recovery codes or HTTP. Challenge owns its original issuer/preparation keys, lifetime and attempts; its Envelope must be nil so the graph supplies its configured envelope owner. Completion retains the bounded counter/comparison/encryption semantics of native TOTP completion. Its envelope key must match Challenge.EnvelopeKeyID. Inputs remain borrowed, immutable and concurrency-safe; construction performs no IO or callbacks.

func (PasskeyTOTPConfiguration) Format

func (PasskeyTOTPConfiguration) Format(s fmt.State, _ rune)

func (PasskeyTOTPConfiguration) LogValue

func (PasskeyTOTPConfiguration) LogValue() slog.Value

LogValue emits only a fixed redacted configuration marker.

func (PasskeyTOTPConfiguration) MarshalJSON

func (PasskeyTOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit signing, comparison and encryption-key export.

func (PasskeyTOTPConfiguration) MarshalText

func (PasskeyTOTPConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit textual startup-key export.

type PasswordChangeConfiguration

type PasswordChangeConfiguration struct {
	Native   passwordpg.PasswordChangeConfig
	Keyed    passwordpg.KeyedPasswordChangeConfig
	Counters riskpg.Config
}

PasswordChangeConfiguration selects native keyed credential replacement, not HTTP. Verification must already be selected in this graph. Native.Counters must be absent: Counters configures the actual protected PostgreSQL owner in this graph's risk namespace. Native.Screening.Now must be absent: the source verification owner supplies its authority clock. Keyed retains the native retry/envelope/intent profile; there is no unkeyed fallback. The verification selection's CSRFKeys also selects protected cookie change. Default native session disposition revokes all sessions; preservation requires explicit native policy. Borrowed resources and bounded callbacks must outlive calls.

func (PasswordChangeConfiguration) Format

Format redacts native key and screening configuration.

func (PasswordChangeConfiguration) MarshalJSON

func (PasswordChangeConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (PasswordChangeConfiguration) MarshalText

func (PasswordChangeConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type PasswordOTPConfiguration

type PasswordOTPConfiguration struct {
	MaximumDuration                            time.Duration
	ConfigurationID, CompletionConfigurationID string
	PolicyID                                   string
	RequestKeys                                kernel.RequestKeyConfig
	IntentKey                                  [32]byte
	ActiveEnvelopeKeyID                        string
	Counters                                   riskpg.Config
	RiskKeys                                   []risk.EvidenceKey
	Policy                                     otp.AttemptPolicy
	AttemptKeyVersion                          uint32
	TemplateID                                 string
	TemplateVersion                            uint32
	LocaleChain                                []string
}

PasswordOTPConfiguration selects native password-origin secondary OTP send and completion, not HTTP or enrollment. The graph supplies the actual primary, child issuer, session, OTP codec/store and encrypted delivery owners. Policy must be a consuming MFA OTP policy. TemplateID/Version select an existing delivery template; LocaleChain is copied by the native owner.

RequestKeys, IntentKey and envelope/counter/evidence keys retain their native independence and rotation contracts. Both actions use the selected durable counter namespace/policy. Configuration IDs pin immutable send/completion semantics. The existing OTP store's cookie keys must match every retained password-flow key: shared storage cannot authenticate the same browser with a different key binding. Construction performs no IO or callbacks.

func (PasswordOTPConfiguration) Format

func (PasswordOTPConfiguration) Format(s fmt.State, _ rune)

Format redacts deployment secrets and correlated configuration.

func (PasswordOTPConfiguration) LogValue

func (PasswordOTPConfiguration) LogValue() slog.Value

LogValue emits only a fixed redacted marker.

func (PasswordOTPConfiguration) MarshalJSON

func (PasswordOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit secret-bearing configuration export.

func (PasswordOTPConfiguration) MarshalText

func (PasswordOTPConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text or map-key export.

type PasswordOTPLoginCompletionConfig

type PasswordOTPLoginCompletionConfig struct {
	Sender            *PasswordOTPLoginSendService
	ConfigurationID   string
	SessionIssuer     session.IssuerConfig
	CSRF              session.CSRFKey
	AttemptKeyVersion uint32
}

PasswordOTPLoginCompletionConfig selects the actual sender's native password, original OTP, browser, risk and transaction owners plus session issuance. ConfigurationID pins immutable session/CSRF/callback semantics; change it when those semantics change. AttemptKeyVersion selects retained native OTP custody. Borrowed owners and clock remain immutable and outlive concurrent calls.

func (PasswordOTPLoginCompletionConfig) Format

func (PasswordOTPLoginCompletionConfig) MarshalJSON

func (PasswordOTPLoginCompletionConfig) MarshalJSON() ([]byte, error)

func (PasswordOTPLoginCompletionConfig) MarshalText

func (PasswordOTPLoginCompletionConfig) MarshalText() ([]byte, error)

type PasswordOTPLoginCompletionService

type PasswordOTPLoginCompletionService struct {
	// contains filtered or unexported fields
}

PasswordOTPLoginCompletionService supplies complete native secondary OTP send/verification/recovery, not ordinary OTP signin or enrollment. It owns no pool, transaction, cache or goroutine. Only a fresh known commit may reveal session/CSRF credentials; retries and recovery return historical metadata.

func NewPasswordOTPLoginCompletionService

func NewPasswordOTPLoginCompletionService(c PasswordOTPLoginCompletionConfig) (*PasswordOTPLoginCompletionService, error)

NewPasswordOTPLoginCompletionService freezes concrete native composition without IO, callbacks, migrations or issuance. Install selected OTP completion counter/session histories before serving. Missing owners or invalid issuance configuration deny; applications provide no missing domain orchestration.

func (PasswordOTPLoginCompletionService) Format

func (PasswordOTPLoginCompletionService) MarshalJSON

func (PasswordOTPLoginCompletionService) MarshalJSON() ([]byte, error)

func (PasswordOTPLoginCompletionService) MarshalText

func (PasswordOTPLoginCompletionService) MarshalText() ([]byte, error)

func (*PasswordOTPLoginCompletionService) OtpSend

OtpSend delegates only to the selected original native sender. It cannot consume the child, change a factor or issue a session.

func (*PasswordOTPLoginCompletionService) OtpSendingRateSource

func (s *PasswordOTPLoginCompletionService) OtpSendingRateSource(ctx context.Context, r mfa.OtpSendRequest) (string, error)

OtpSendingRateSource borrows the same native sender without new disclosure, correlation or freshness ownership.

func (*PasswordOTPLoginCompletionService) OtpVerificationRateSource

func (s *PasswordOTPLoginCompletionService) OtpVerificationRateSource(ctx context.Context, r mfa.OtpVerifyRequest) (user identity.UserID, child string, lifetime time.Duration, err error)

OtpVerificationRateSource authenticates original issuance and exact retained code/browser intent before returning the immutable subject, child and signed lifetime for HTTP quotas. Matching historical results precede mutable factor and continuation reads, including counted denial and consumed-child success. Changed historical intent fails closed. New requests require current native primary/factor/recipient/browser admission, without code comparison, attempt debit, reservation, session issuance or freshness renewal. This metadata grants no completion authority. Expired proofs use code-free RecoverOtpVerify. All errors, panics and cancellation return zero metadata; calls are bounded by the configured duration and earlier inbound deadline.

func (*PasswordOTPLoginCompletionService) OtpVerify

OtpVerify authenticates original code/browser intent before mutable source reads. It restores the exact committed send and one retained native attempt, admits current password/factor/recipient/policy/risk, then atomically commits OTP, child, shared budget and session effects through the sole coordinator. Failure/unknown/replay withholds credentials. Original remember and password freshness cannot be replaced. This profile rejects enrollment/trusted devices.

func (*PasswordOTPLoginCompletionService) RecoverOtpSend

RecoverOtpSend performs code/proof-free original send reconciliation and never queues another message or renews its provenance.

func (*PasswordOTPLoginCompletionService) RecoverOtpVerify

RecoverOtpVerify reconciles only exact original command scope under current query policy, without code, proof, cookie, generation or credential delivery.

type PasswordOTPLoginSendConfig

type PasswordOTPLoginSendConfig struct {
	ConfigurationID, PolicyID, IssuerURL string
	MaximumDuration                      time.Duration
	Primary                              *passwordpg.SigninService
	Issuance                             *otppg.MFALoginIssuer
	Issuer                               capabilitypg.IssuerConfig
	Session                              sessionpg.Config
	Profile                              sessionpg.IdentifierAdmissionConfig
	CookieKeys                           map[uint32]session.DigestKey
	Coordinator                          kernel.CoordinatorConfig
	RequestKeys                          kernel.RequestKeyConfig
	Risk                                 risk.ProtectedProviderAdmissionCustodyConfig
	Counters                             riskpg.Config
	AllowedOrigins                       []string
	ActiveEnvelopeKeyID                  string
	// contains filtered or unexported fields
}

PasswordOTPLoginSendConfig selects concrete password-primary, secondary OTP, browser, policy, risk/counter and encryption owners. It selects neither TOTP, enrollment, session issuance nor HTTP. All borrowed owners/callbacks must be immutable and outlive calls. ConfigurationID pins callback/signing semantics: change it whenever those semantics change. AllowedOrigins are exact HTTPS origins, copied at construction. Construct intent custody with NewPasswordOTPLoginSendConfig, then fill the public composition fields.

func NewPasswordOTPLoginSendConfig

func NewPasswordOTPLoginSendConfig(keys kernel.RequestKeyConfig, intent [32]byte, envelopeKey string) (PasswordOTPLoginSendConfig, error)

NewPasswordOTPLoginSendConfig retains an independent nonzero request-intent key without IO. Keep it independent of cookie/envelope/fingerprint keys and stable while original requests need restoration. Zero/literal custody denies.

func (PasswordOTPLoginSendConfig) Format

func (PasswordOTPLoginSendConfig) MarshalJSON

func (PasswordOTPLoginSendConfig) MarshalJSON() ([]byte, error)

func (PasswordOTPLoginSendConfig) MarshalText

func (PasswordOTPLoginSendConfig) MarshalText() ([]byte, error)

type PasswordOTPLoginSendService

type PasswordOTPLoginSendService struct {
	// contains filtered or unexported fields
}

PasswordOTPLoginSendService composes actual native owners through the existing request-key, preparation and transaction journals. Sending cannot consume the original primary/child, reset its budget, confirm a factor or issue a session. It owns no pool, goroutine, cache or independent transaction. Concurrent calls require immutable inputs; errors never contain submitted proof or cookie.

func NewPasswordOTPLoginSendService

func NewPasswordOTPLoginSendService(pool *database.Pool, c PasswordOTPLoginSendConfig, keys *keyring.Provider) (*PasswordOTPLoginSendService, error)

NewPasswordOTPLoginSendService freezes selected native composition without IO, callbacks, generation or bootstrap. Install all selected migration/key histories before serving, including the anonymous MFA-send counter upgrade, and initialize the actual OTP issuer. No application-written domain store or TOTP/session-issuance dependency is accepted. Pool/keyring remain caller-owned.

func (PasswordOTPLoginSendService) Format

func (PasswordOTPLoginSendService) MarshalJSON

func (PasswordOTPLoginSendService) MarshalJSON() ([]byte, error)

func (PasswordOTPLoginSendService) MarshalText

func (PasswordOTPLoginSendService) MarshalText() ([]byte, error)

func (*PasswordOTPLoginSendService) OtpSend

OtpSend retains the original native input before risk or entropy, then queues one purpose-bound challenge in the sole coordinator transaction. Matching retries restore original input/output and never select another destination or code. Queue status is not provider delivery, factor proof or login completion.

func (*PasswordOTPLoginSendService) OtpSendingRateSource

func (s *PasswordOTPLoginSendService) OtpSendingRateSource(ctx context.Context, r mfa.OtpSendRequest) (destination string, err error)

OtpSendingRateSource returns only the native authenticated canonical recipient for internal HTTP delivery quotas. Exact retained-key custody precedes current primary/child/factor reads so an original send remains observable after login. Only authorized absence uses current source selection. No command allocation, code generation, comparison, counter debit, queue or session effect occurs. This sensitive tuple must never enter HTTP responses, logs or diagnostics and grants no sending authority. Native OtpSend independently owns its protected checks and effects. Errors/panics/cancellation return an empty destination.

func (*PasswordOTPLoginSendService) RecoverOtpSend

RecoverOtpSend returns only the exact historical code/proof-free outcome after current result-access authorization. It never generates, redelivers, authenticates a factor or renews the original primary/child/browser.

type PasswordPreAuthConfiguration

type PasswordPreAuthConfiguration struct {
	ActorID               identity.ActorID
	Origin, CallbackURL   string
	FlowKeyIndex          uint32
	AuditRetentionVersion uint64
	FlowTTL               time.Duration
	TokenSize             int
	Cookie                session.CookiePolicy
}

PasswordPreAuthConfiguration selects a fixed password original-flow profile. Origin and CallbackURL must be allowed by the consuming native workflow owner. FlowKeyIndex selects its retained Native.FlowKeys, including original version; action, policy and revision come from that owner. ActorID is a service identity, not the future authenticated user. Lifetime, token size and secure cookie obey session.PreAuthIssuerConfig. Construction performs no IO or entropy; borrowed configuration must not be mutated concurrently.

func (PasswordPreAuthConfiguration) Format

Format hides trusted deployment configuration.

func (PasswordPreAuthConfiguration) MarshalJSON

func (PasswordPreAuthConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON prevents implicit deployment custody export.

func (PasswordPreAuthConfiguration) MarshalText

func (PasswordPreAuthConfiguration) MarshalText() ([]byte, error)

MarshalText prevents implicit deployment custody export.

type PasswordRecoveryConfiguration

type PasswordRecoveryConfiguration struct {
	MaximumDuration           time.Duration
	ConfigurationID, PolicyID string
	Counters                  riskpg.Config
	RiskKeys                  []risk.EvidenceKey
	VerificationKeys          map[uint32][32]byte
	ActiveEnvelopeKeyID       string
}

PasswordRecoveryConfiguration selects original password-primary recovery completion, not HTTP or enrollment. VerificationKeys must retain every live recovery-set key version; missing keys fail closed. ConfigurationID pins the retained completion semantics. The graph supplies actual primary/browser, issuer and counted risk owners. Construction copies keys and performs no IO.

func (PasswordRecoveryConfiguration) Format

Format redacts all configuration and key custody.

func (PasswordRecoveryConfiguration) LogValue

LogValue emits a fixed redacted marker.

func (PasswordRecoveryConfiguration) MarshalJSON

func (PasswordRecoveryConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit key/configuration export.

func (PasswordRecoveryConfiguration) MarshalText

func (PasswordRecoveryConfiguration) MarshalText() ([]byte, error)

MarshalText rejects text/map-key export.

type PasswordResetConfiguration

type PasswordResetConfiguration struct {
	Native passwordpg.ResetConfig
}

PasswordResetConfiguration selects native request/completion/recovery. Native supplies immutable keys, typed password/HIBP policy, normalization, callbacks, issuer and command profiles, not domain stores. Native.Request is mandatory. Native.Risk.Evaluation and Request.Delivery.Owner/Renderer must be zero: the graph composes counted risk and encrypted delivery from its selected owners. The current reference profile shares OTP's risk/delivery graph and an already selected session namespace; independent reset-only deployment remains pending. Query, admission and request-key policies must use this graph's exact service. EnvelopeKeys must be the local keyring required by native reset lock custody. Construction is side-effect free and preserves the native borrowed-callback and retained-key contracts; do not mutate inputs concurrently.

func (PasswordResetConfiguration) Format

Format hides keys and provider/policy internals for every formatting verb.

func (PasswordResetConfiguration) MarshalJSON

func (PasswordResetConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit export of native secret-bearing composition.

func (PasswordResetConfiguration) MarshalText

func (PasswordResetConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit textual export of native composition.

type PasswordSigninConfiguration

type PasswordSigninConfiguration struct {
	Native passwordpg.SigninConfig
	// PreAuth optionally selects the native original password-flow issuer.
	// It does not enable HTTP. The selected key index comes from Native.FlowKeys,
	// so initiation cannot introduce a second independently configured key set.
	PreAuth *PasswordPreAuthConfiguration
	// MFA opts into password-first continuations using the native issuer and
	// encrypted child custody. Nil preserves the existing single-factor profile.
	MFA *passwordpg.MFAChallengeConfig
	// TOTP selects the graph-owned second-factor completion pipeline, not HTTP.
	// MFA must be selected too; a magic-link request owner is not required.
	TOTP *PasswordTOTPConfiguration
	// Recovery selects password-origin recovery completion, independently of
	// TOTP completion or HTTP. MFA must also be selected.
	Recovery *PasswordRecoveryConfiguration
	// OTP independently selects native secondary OTP send/completion, not HTTP.
	// MFA must explicitly allow otp; the graph supplies all native owners.
	OTP *PasswordOTPConfiguration
}

PasswordSigninConfiguration opts into the native password-login owner without enabling HTTP. Native supplies password policy, keys and exact original-flow bindings. Native.Risk.Evaluation must be zero: this graph injects its counted evaluator. Native policies must match the selected graph's authorization and revision. The current profile requires OTP's selected consuming session base; this reuses storage, not OTP authentication or its original flow action. Inputs and borrowed callbacks must remain immutable/concurrency-safe during construction. The native owner freezes retained keys and closes no borrowed IO.

func (PasswordSigninConfiguration) Format

Format redacts secret-bearing native configuration for all formatting verbs.

func (PasswordSigninConfiguration) MarshalJSON

func (PasswordSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit export of configuration custody.

func (PasswordSigninConfiguration) MarshalText

func (PasswordSigninConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export of configuration custody.

type PasswordSignupConfiguration

type PasswordSignupConfiguration struct {
	Native      passwordpg.SignupConfig
	Issuer      issuerpg.IssuerConfig
	Preparation issuerpg.IssuancePreparationConfig
	Counters    riskpg.Config
	// PreAuth selects fixed signup initiation using Native's keys and policy.
	// Nil disables initiation, without disabling direct signup/confirmation.
	PreAuth *PasswordPreAuthConfiguration
	// VerificationSignin independently selects original-browser registration
	// confirmation followed by native email-possession signin. Nil preserves
	// verification-only behavior. It enables no HTTP route; Session must select
	// compatible primary read/logout. Enrolled MFA requires explicit TOTP
	// selection; unknown factor authority always denies.
	VerificationSignin *passwordpg.VerificationSigninConfig
	// VerificationTOTP selects completion of the explicitly TOTP-enabled
	// verification-signin primary. It enables no HTTP route or other MFA method.
	VerificationTOTP *VerificationTOTPConfiguration
	// VerificationSessionLineage pins the installed session-migration order,
	// not an authentication policy. Pin it when enabling verification TOTP and
	// retain it through later feature selection. Zero preserves legacy selection
	// only; new verification-TOTP composition requires an explicit lineage.
	VerificationSessionLineage VerificationSessionLineage
}

PasswordSignupConfiguration selects required-email-verification registration and confirmation without HTTP. Native supplies immutable policy and keys; its evaluator, verification issuer/codec/counters and delivery owner/renderer must be absent. This graph constructs those actual owners together, retaining the same issuer for preparation and confirmation. Counters owns protected command admission, not the external velocity projection. Borrowed callbacks must be bounded and concurrent-safe; construction performs no IO.

func (PasswordSignupConfiguration) Format

Format redacts native secret-bearing configuration.

func (PasswordSignupConfiguration) MarshalJSON

func (PasswordSignupConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (PasswordSignupConfiguration) MarshalText

func (PasswordSignupConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type PasswordTOTPConfiguration

type PasswordTOTPConfiguration MagicLinkTOTPConfiguration

PasswordTOTPConfiguration selects password-first native TOTP completion. Fields retain MagicLinkTOTPConfiguration's bounded counter, encryption and comparison-key semantics, but do not select or depend on magic-link login. The graph injects the actual password primary, browser, policy and issuer. Neither construction nor selecting this configuration enables HTTP or IO.

func (PasswordTOTPConfiguration) Format

func (PasswordTOTPConfiguration) Format(s fmt.State, _ rune)

func (PasswordTOTPConfiguration) LogValue

LogValue redacts configuration in structured logs.

func (PasswordTOTPConfiguration) MarshalJSON

func (PasswordTOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit secret-bearing configuration export.

func (PasswordTOTPConfiguration) MarshalText

func (PasswordTOTPConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type PasswordVerificationConfiguration

type PasswordVerificationConfiguration struct {
	Native   passwordpg.ReauthenticationConfig
	CSRFKeys []session.CSRFKey
}

PasswordVerificationConfiguration selects native password reauthentication, not HTTP or password replacement. Native supplies signing custody and exact purpose/action/audience targets. Native.Risk.Evaluation and Verifier.Now must be absent: the graph injects counted risk and its session authority clock. Session and PasswordSignin must be selected with the same primary profile, verifier primitive and current lookup key. CSRFKeys optionally selects the distinct cookie workflow; absent keys never enable cookie-to-bearer fallback. Borrowed callbacks must be bounded/concurrent-safe and outlive graph calls.

func (PasswordVerificationConfiguration) Format

Format redacts native signing and key custody.

func (PasswordVerificationConfiguration) MarshalJSON

func (PasswordVerificationConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (PasswordVerificationConfiguration) MarshalText

func (PasswordVerificationConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type PhoneChangeConfiguration

type PhoneChangeConfiguration struct {
	Policy                     *phone.NumberPolicy
	SendPrimary, UpdatePrimary passwordpg.ActionPrimaryConfig
	Native                     passwordpg.PhoneChangeConfig
	Issuance                   PhoneIssuanceConfiguration
}

PhoneChangeConfiguration independently selects native verified-phone replacement, not enrollment or HTTP. The graph injects its genuine password proof, email signin/reset, session, OTP, risk and delivery owners. Native.Issuer, both risk Evaluation/Keys and Notice.Delivery/Templates must be zero. Cookie primary CSRFKeys must be zero for injection from PasswordVerification. Sending and consuming primaries select distinct actions/audiences on the same owner.

func (PhoneChangeConfiguration) Format

func (PhoneChangeConfiguration) Format(s fmt.State, _ rune)

Format redacts retained native configuration and key custody.

func (PhoneChangeConfiguration) MarshalJSON

func (PhoneChangeConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit native configuration export.

func (PhoneChangeConfiguration) MarshalText

func (PhoneChangeConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit native configuration/map-key export.

type PhoneChangeService

type PhoneChangeService struct {
	// contains filtered or unexported fields
}

PhoneChangeService borrows the selected native replacement owner. All calls retain graph tenant, initialization, deadline and shutdown guards. It owns no resources; zero and handles retained after graph Close deny. Concurrent calls share only the native owners' documented synchronization and custody.

func (*PhoneChangeService) Format

func (*PhoneChangeService) Format(s fmt.State, _ rune)

Format redacts the complete borrowed graph and native custody.

func (*PhoneChangeService) MarshalJSON

func (*PhoneChangeService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit graph export.

func (*PhoneChangeService) MarshalText

func (*PhoneChangeService) MarshalText() ([]byte, error)

MarshalText rejects implicit graph and map-key export.

func (*PhoneChangeService) PhoneChangeDestination

func (s *PhoneChangeService) PhoneChangeDestination(ctx context.Context, r phone.ChangeRequest) (phone.Number, error)

PhoneChangeDestination reads exact authenticated original sending rate input without mapping creation, challenge issuance or protected mutation.

func (*PhoneChangeService) PhoneChangeSession

func (s *PhoneChangeService) PhoneChangeSession(ctx context.Context, tenant identity.TenantID, flow otp.SendFlow) (session.Session, error)

PhoneChangeSession authenticates original possession for transport mapping, not current executable session authority or permission for disclosure.

func (*PhoneChangeService) PhoneUpdateLifetime

func (s *PhoneChangeService) PhoneUpdateLifetime(ctx context.Context, r phone.UpdateRequest) (time.Duration, error)

PhoneUpdateLifetime reads only the authenticated immutable issued interval; it neither compares code nor grants current admission or renewed validity.

func (*PhoneChangeService) RecoverUpdate

RecoverUpdate delegates original code-free current-authorized observation.

func (*PhoneChangeService) SendChange

SendChange delegates original keyed new-number SMS with no identifier change.

func (*PhoneChangeService) Update

Update delegates the distinct fresh-proof/OTP atomic native replacement.

type PhoneConfiguration

type PhoneConfiguration struct {
	Policy   *phone.NumberPolicy
	Primary  passwordpg.ActionPrimaryConfig
	Native   passwordpg.PhoneVerificationConfig
	Issuance PhoneIssuanceConfiguration
}

PhoneConfiguration selects native existing-account enrollment and consuming SMS verification, not HTTP or login. The graph supplies its actual proof, pool, counted risk, OTP codec/session, encrypted delivery and migration owners. Primary.Action must be identity.phone.send-verification. Native.Issuer and Native.Risk.Evaluation must be zero for graph injection. RequestKeys must use a distinct namespace under the graph's same authoritative policy. Every retention/key/cooldown policy stays explicit in its native configuration.

func (PhoneConfiguration) Format

func (PhoneConfiguration) Format(s fmt.State, _ rune)

Format redacts retained native configuration and session key custody.

func (PhoneConfiguration) MarshalJSON

func (PhoneConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit configuration export.

func (PhoneConfiguration) MarshalText

func (PhoneConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key configuration export.

type PhoneIssuanceConfiguration

type PhoneIssuanceConfiguration struct {
	Policy          otp.AttemptPolicy
	SessionKeys     map[uint32][]byte
	FreshnessLimit  time.Duration
	TemplateID      string
	TemplateVersion uint32
	ProviderVersion uint64
	LocaleChain     []string
}

PhoneIssuanceConfiguration selects an existing SMS template/provider and consuming phone-verification OTP policy. SessionKeys must match the graph's current password issuer and retained session readers. FreshnessLimit can only shorten native source validity. Locale/key inputs are copied by native owners.

func (PhoneIssuanceConfiguration) Format

Format redacts retained session issuance keys.

func (PhoneIssuanceConfiguration) MarshalJSON

func (PhoneIssuanceConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit issuance configuration export.

func (PhoneIssuanceConfiguration) MarshalText

func (PhoneIssuanceConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit issuance configuration export.

type PhoneOTPSigninConfiguration

type PhoneOTPSigninConfiguration struct {
	Policy          *phone.NumberPolicy
	CodePolicy      otp.AttemptPolicy
	RequestKeys     kernel.RequestKeyConfig
	TemplateID      string
	TemplateVersion uint32
	ProviderVersion uint64
	LocaleChain     []string
}

PhoneOTPSigninConfiguration independently selects verified-phone SMS-code signin, never phone/password login or enrollment. OTP.Signin and OTP.PreAuth supply the common session, authority and original-flow policies. CodePolicy explicitly selects a consuming-only signin code profile. The selected native owner always requires known-empty current factor authority. RequestKeys needs its own namespace and the same authorization/revision as OTP; SMS template/provider/locales are explicit, not the email defaults. Construction freezes configuration without IO; dependencies remain borrowed.

func (PhoneOTPSigninConfiguration) Format

Format redacts deployment keys and borrowed policy.

func (PhoneOTPSigninConfiguration) MarshalJSON

func (PhoneOTPSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (PhoneOTPSigninConfiguration) MarshalText

func (PhoneOTPSigninConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export and map-key use.

type PhoneOTPSigninService

type PhoneOTPSigninService interface {
	phone.SigninService
	otp.SigninSourceService
}

PhoneOTPSigninService adds original code-free source resolution for trusted rate admission to the native phone workflow. Resolution grants no login authority and its sensitive projection must never be returned to a client.

type PhonePasswordResetConfiguration

type PhonePasswordResetConfiguration struct {
	Policy               *phone.NumberPolicy
	Request              passwordpg.PhonePasswordResetRequestConfig
	Completion           passwordpg.PhonePasswordResetCompletionConfig
	Issuance             PhoneIssuanceConfiguration
	PreAuth              PasswordPreAuthConfiguration
	ComparisonKey        [32]byte
	ComparisonKeyVersion uint32
}

PhonePasswordResetConfiguration independently selects the native SMS plus confirmed independent-TOTP recovery profile, not HTTP or phone signin. Both native carrier-risk enablement flags remain mandatory. This initial reference profile requires DurableAdmission; it reuses that exact durable counter state.

The graph supplies Request.SMS, Request.Delivery.Owner/Renderer, both risk key lists, Risk.Issuer.Evaluation/Executor, Risk.Store.UseIssuer/UseCounters and Completion.TOTP; those fields must be zero. Risk.Coordinator must retain the graph's authoritative query/admission policy. Other native configuration, canonical issuer/key custody, external carrier evaluator and bounded HIBP collector remain explicit. PreAuth uses actual retained password-flow keys, exact origin/callback and zero Remember. Issuance selects the SMS template and OTP policy; its session-key/freshness fields are unused and must be zero. If email password reset is also selected, it must use the same session schema; mixed reset stores are rejected rather than rewriting installed email history. No fake store, accepted factor or caller-selected account can be supplied.

func (PhonePasswordResetConfiguration) Format

func (PhonePasswordResetConfiguration) MarshalJSON

func (PhonePasswordResetConfiguration) MarshalJSON() ([]byte, error)

func (PhonePasswordResetConfiguration) MarshalText

func (PhonePasswordResetConfiguration) MarshalText() ([]byte, error)

type PhonePasswordResetService

type PhonePasswordResetService struct {
	// contains filtered or unexported fields
}

PhonePasswordResetService is a borrowed selected-native workflow handle. Calls retain graph initialization, tenant, deadline and shutdown admission; zero or retained-after-Close handles deny. The pool, native services and providers remain graph-owned/borrowed under their original contracts.

func (*PhonePasswordResetService) EvaluatePasswordResetCompletionRisk

EvaluatePasswordResetCompletionRisk resolves distinct original evidence before new live admission, preserving terminal retries without provider work.

func (*PhonePasswordResetService) EvaluatePasswordResetRequestRisk

EvaluatePasswordResetRequestRisk derives current account/phone/factor scope from the actual original browser and canonical number, never body identity.

func (*PhonePasswordResetService) Format

func (*PhonePasswordResetService) Format(s fmt.State, _ rune)

func (*PhonePasswordResetService) MarshalJSON

func (*PhonePasswordResetService) MarshalJSON() ([]byte, error)

func (*PhonePasswordResetService) MarshalText

func (*PhonePasswordResetService) MarshalText() ([]byte, error)

func (*PhonePasswordResetService) PasswordResetComplete

PasswordResetComplete delegates the actual joint capability/SMS/TOTP/risk transaction, required password screening and all-session invalidation.

func (*PhonePasswordResetService) PasswordResetCompletionRateSource

PasswordResetCompletionRateSource returns authenticated original rate input, not executable admission. It neither renews lifetime nor spends any budget.

func (*PhonePasswordResetService) PasswordResetRequest

PasswordResetRequest queues original SMS/link intents, never a session.

func (*PhonePasswordResetService) RecoverPasswordResetComplete

RecoverPasswordResetComplete cannot compare codes, rehash, reissue or renew validity; it delegates current-authorized original native outcome resolution.

func (*PhonePasswordResetService) RecoverPasswordResetRequest

RecoverPasswordResetRequest reads only actual scoped original history.

type PhoneRemovalConfiguration

type PhoneRemovalConfiguration struct {
	Policy  *phone.NumberPolicy
	Primary passwordpg.ActionPrimaryConfig
	Native  passwordpg.PhoneRemovalConfig
}

PhoneRemovalConfiguration independently selects native self-removal. The graph injects actual password verification, email/password signin/reset, risk and delivery owners. Native.Risk.Evaluation/Keys and Notice.Delivery/Templates must be zero; Primary selects the exact removal action and audience. Cookie CSRF keys must match this graph's verification owner. Enrollment is not required.

func (PhoneRemovalConfiguration) Format

func (PhoneRemovalConfiguration) Format(s fmt.State, _ rune)

Format redacts native configuration and key custody.

func (PhoneRemovalConfiguration) MarshalJSON

func (PhoneRemovalConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (PhoneRemovalConfiguration) MarshalText

func (PhoneRemovalConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit configuration export.

type PhoneRemovalService

type PhoneRemovalService struct {
	// contains filtered or unexported fields
}

PhoneRemovalService borrows a selected graph's native removal owner. All calls retain tenant, startup, deadline and shutdown guards; it owns no resources. Zero denies and nested diagnostics cannot traverse retained graph secrets.

func (*PhoneRemovalService) Format

func (*PhoneRemovalService) Format(s fmt.State, _ rune)

Format redacts the complete borrowed graph.

func (*PhoneRemovalService) MarshalJSON

func (*PhoneRemovalService) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit graph export.

func (*PhoneRemovalService) MarshalText

func (*PhoneRemovalService) MarshalText() ([]byte, error)

MarshalText denies implicit graph/map-key export.

func (*PhoneRemovalService) RecoverRemoval

RecoverRemoval observes the original code-free outcome, never new mutation.

func (*PhoneRemovalService) RemovalRateSource

func (s *PhoneRemovalService) RemovalRateSource(ctx context.Context, r phone.RemoveRequest) (identity.UserID, error)

RemovalRateSource authenticates original keyed input without granting removal.

func (*PhoneRemovalService) Remove

Remove delegates the sole native atomic removal, proof and required effects.

type PhoneService

type PhoneService struct {
	// contains filtered or unexported fields
}

PhoneService borrows the selected native existing-account enrollment owner. Every invocation obeys graph startup, tenant, deadline and drain/Close bounds. It owns no pool, journal, provider, timer or goroutine. Zero always denies. Closure custody prevents nested diagnostics from traversing native secrets.

func (*PhoneService) Format

func (*PhoneService) Format(s fmt.State, _ rune)

Format redacts the entire borrowed graph.

func (*PhoneService) MarshalJSON

func (*PhoneService) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit graph export.

func (*PhoneService) MarshalText

func (*PhoneService) MarshalText() ([]byte, error)

MarshalText rejects implicit text/map-key graph export.

func (*PhoneService) PhoneEnrollmentDestination

func (s *PhoneService) PhoneEnrollmentDestination(ctx context.Context, r phone.EnrollmentRequest) (phone.Number, error)

PhoneEnrollmentDestination preserves native read-only original keyed custody before shared rate admission; it does not create delivery or mutate identity.

func (*PhoneService) PhoneVerificationLifetime

func (s *PhoneService) PhoneVerificationLifetime(ctx context.Context, r phone.VerificationRequest) (time.Duration, error)

PhoneVerificationLifetime returns authenticated immutable original issuance metadata without code comparison, debit, renewal or verification authority.

func (*PhoneService) PhoneVerificationSession

func (s *PhoneService) PhoneVerificationSession(ctx context.Context, tenant identity.TenantID, flow otp.SendFlow) (session.Session, error)

PhoneVerificationSession authenticates original session possession for trusted transport mapping, not current session authority or renewed freshness.

func (*PhoneService) RecoverVerification

RecoverVerification observes original code-free durability under current native historical disclosure policy. No code is compared or phone disclosed.

func (*PhoneService) SendVerification

SendVerification delegates atomic pending enrollment and queued encrypted SMS; it never verifies a phone or signs the user in.

func (*PhoneService) Verify

Verify delegates one native counted attempt and atomic pending-phone effect.

type PhoneSigninConfiguration

type PhoneSigninConfiguration struct {
	Policy *phone.NumberPolicy
	// TOTP explicitly selects original phone comparison and confirmed TOTP
	// completion. Nil retains known-empty-factor signin. This enables no
	// additional HTTP route or alternative factor method.
	TOTP *PhoneTOTPConfiguration
}

PhoneSigninConfiguration opts into native verified-phone/password signin, independently of phone enrollment or HTTP. The graph copies PasswordSignin's native keys/policy, substitutes this fixed NumberPolicy and owns its distinct original pre-auth issuer. Without TOTP, enrolled or unavailable factor authority denies. Explicit TOTP selection requires the independent confirmed factor before issuing a session. Policy must remain immutable during construction. Both native owners freeze their retained configuration.

func (PhoneSigninConfiguration) Format

func (PhoneSigninConfiguration) Format(s fmt.State, _ rune)

Format hides retained deployment policy for all formatting verbs.

func (PhoneSigninConfiguration) MarshalJSON

func (PhoneSigninConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment-policy export.

func (PhoneSigninConfiguration) MarshalText

func (PhoneSigninConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit deployment-policy export.

type PhoneTOTPConfiguration

type PhoneTOTPConfiguration struct {
	Challenge  passwordpg.MFAChallengeConfig
	Completion PasswordTOTPConfiguration
}

PhoneTOTPConfiguration selects the existing native TOTP challenge/completion owners with phone-specific primary provenance. Only TOTP is supported; no recovery-code, secondary SMS or trusted-device fallback follows selection.

func (PhoneTOTPConfiguration) Format

func (PhoneTOTPConfiguration) Format(s fmt.State, _ rune)

func (PhoneTOTPConfiguration) MarshalJSON

func (PhoneTOTPConfiguration) MarshalJSON() ([]byte, error)

func (PhoneTOTPConfiguration) MarshalText

func (PhoneTOTPConfiguration) MarshalText() ([]byte, error)

type PreAuthService

PreAuthService is the selected original-flow preparation, issuance and outcome-only recovery API. All calls require initialized graph and explicit tenant admission and deny after shutdown. Prepare performs no durable work; retain its unchanged Command after Issue ambiguity. Issue delivers a cookie only for the original new commitment. Recovery never reveals or renews one. Calls are concurrent-safe and bounded by the graph/caller lifetime. No HTTP route, listener or automatic retry is enabled. Remember is already resolved through the shared session policy before Prepare; action/origin/callback are trusted configuration, never request choices.

type ProviderConfig

type ProviderConfig struct {
	Name, Issuer, SecretReference string
	Enabled                       bool
}

ProviderConfig describes an explicitly selected provider. Names are unique 1..128 UTF-8 bytes; issuer/reference bounds are 2048/4096 bytes. Unsupported enabled providers are rejected, never silently omitted or defaulted.

type ProviderSet

type ProviderSet struct {
	// contains filtered or unexported fields
}

ProviderSet is the sealed selected deployment-provider owner. Copies share one graph; no sender, key service or native feature owner is exported.

func ComposeProviders

func ComposeProviders(stores StoreSet) (ProviderSet, error)

ComposeProviders consumes this graph's selected providers once, without IO, callbacks, migrations or goroutines. Zero/recovery-only/closed graphs deny.

func (ProviderSet) Format

func (ProviderSet) Format(s fmt.State, _ rune)

func (ProviderSet) MarshalJSON

func (ProviderSet) MarshalJSON() ([]byte, error)

func (ProviderSet) MarshalText

func (ProviderSet) MarshalText() ([]byte, error)

type Readiness

type Readiness struct {
	Ready    bool
	Failures []ReadinessCode
	Degraded []DegradationCode
}

Readiness is a detached instantaneous observation, not admission authority.

type ReadinessCode

type ReadinessCode string

ReadinessCode is a stable opaque blocking label, never an endpoint or error.

type ReferenceConfig

type ReferenceConfig struct {
	Profile               DeploymentProfile
	Policies              identity.PolicySet
	HTTP                  identityhttp.TransportPolicy
	ProviderConfiguration []ProviderConfig
	Migration             MigrationPolicy
	Workers               WorkerPolicy
	Bootstrap             BootstrapPolicy
	Tenant                TenantPolicy
}

ReferenceConfig is copied during construction. Callbacks/resources remain borrowed, bounded and concurrency-safe; callers must not mutate inputs during construction. All five PolicySet members are mandatory and remain unchanged. Authorize must be the same comparable service handle already bound into the sealed graph (use a pointer for services with noncomparable value fields). Secrets and callback internals are never exported by formatting/serialization.

func (ReferenceConfig) Format

func (ReferenceConfig) Format(s fmt.State, _ rune)

Format redacts deployment policies and resource/callback internals.

func (ReferenceConfig) MarshalJSON

func (ReferenceConfig) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit deployment export.

func (ReferenceConfig) MarshalText

func (ReferenceConfig) MarshalText() ([]byte, error)

MarshalText rejects implicit deployment export.

type ReferenceDependencies

type ReferenceDependencies struct {
	PostgreSQL     *database.Pool
	EnvelopeKeys   envelope.KeyProvider
	DeliverySender delivery.Sender
}

ReferenceDependencies supplies deployment resources, never domain stores or workflow callbacks. PostgreSQL remains caller-owned, including after Close. Its pool configuration and callbacks must satisfy go-postgres's contract. EnvelopeKeys and DeliverySender are required only for selected OTP/delivery. They remain caller-owned, cooperative bounded, concurrency-safe dependencies.

func (ReferenceDependencies) Format

func (ReferenceDependencies) Format(s fmt.State, _ rune)

func (ReferenceDependencies) MarshalJSON

func (ReferenceDependencies) MarshalJSON() ([]byte, error)

func (ReferenceDependencies) MarshalText

func (ReferenceDependencies) MarshalText() ([]byte, error)

type ReferenceMigrationApplyRequest

type ReferenceMigrationApplyRequest struct {
	CommandID      identity.CommandID
	Plan           MigrationPlan
	IdempotencyKey identity.IdempotencyKey
}

ReferenceMigrationApplyRequest supplies the complete immutable original plan, a globally unique command ID and an owned retry key. This operation's command grammar is 16..128 ASCII letters, digits, underscore or hyphen (not the kernel command generator's narrower encoding). Concurrent input mutation is invalid.

type ReferenceMigrationApplyResult

type ReferenceMigrationApplyResult struct{ Result MigrationApplyResult }

ReferenceMigrationApplyResult contains one immutable bounded projection.

type ReferenceMigrationCheckRequest

type ReferenceMigrationCheckRequest struct{ Modules []ModuleID }

ReferenceMigrationCheckRequest selects 1..128 unique canonical module IDs, each at most 128 bytes. Current versions are never supplied by the caller.

type ReferenceMigrationCheckResult

type ReferenceMigrationCheckResult struct{ Statuses []ModuleMigrationStatus }

ReferenceMigrationCheckResult returns independently owned statuses sorted by canonical module ID. Different ledgers are separately discovered snapshots.

type ReferenceMigrationPlanRequest

type ReferenceMigrationPlanRequest struct{ Modules []ModuleID }

ReferenceMigrationPlanRequest selects 1..128 unique selected canonical IDs. Pending prerequisites must be explicitly selected; completed prerequisites are discovered, never supplied or silently reapplied by the caller.

type ReferenceMigrationPlanResult

type ReferenceMigrationPlanResult struct{ Plan MigrationPlan }

ReferenceMigrationPlanResult contains one detached complete canonical plan.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server owns one immutable router/document over the selected sealed graph. It acquires no listener, pool, worker, migration or native startup ownership. Initialize/recovery, migration deployment and StoreSet.Close remain explicit. The current profile supports probes and selected original-flow initiation; remaining OTP/browser routes and full lifecycle readiness remain in progress.

func NewServer

NewServer validates the selected graph, callbacks, deployment profile and transport before exposing a handler. It performs no IO, callbacks, entropy, startup, migrations or goroutine creation; failure returns no partial server. Router failure preserves InvalidInputError's reference_server_router field through errors.As. errors.Is additionally distinguishes canceled, deadline and identityhttp.ErrInvalidInput failures; other causes are redacted to identity.UnavailableError. The original error/configuration is not retained.

func (Server) Format

func (Server) Format(s fmt.State, _ rune)

Format redacts borrowed resources, deployment policies and callback custody.

func (*Server) Handler

func (s *Server) Handler() http.Handler

Handler returns the validated immutable router; zero Server returns nil.

func (*Server) Health

func (s *Server) Health(ctx context.Context) Readiness

Health reports process-only liveness without dependency IO or callbacks.

func (Server) MarshalJSON

func (Server) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit export of the owned server graph.

func (Server) MarshalText

func (Server) MarshalText() ([]byte, error)

MarshalText rejects implicit export of the owned server graph.

func (*Server) OpenAPI

func (s *Server) OpenAPI() identityhttp.OpenAPIDocument

OpenAPI returns the native document's detached public snapshots; zero is empty.

func (*Server) Readiness

func (s *Server) Readiness(ctx context.Context) Readiness

Readiness never substitutes a listener or initialized flag for native health. Before startup it performs no IO. Initialized selected graphs require fresh complete migration compatibility and every selected tenant's original native custody. One server budget bounds the observation; closure joins/cancels it. Success is momentary, not cached admission or permission to skip workflow checks. No counter, marker, TTL, evidence or health authority is renewed.

type SessionConfiguration

type SessionConfiguration struct {
	Native   sessionpg.SignOutServiceConfig
	CSRFKeys []session.CSRFKey
	// Passkey admits the explicitly configured native passkey issuer into common
	// reads and signout. False retains the separate Passkeys handle only.
	Passkey bool
}

SessionConfiguration selects native primary reads and self signout, without HTTP. Native freezes the authority profile, lookup keys, clock, policy and transaction bounds. Validation.Clock must be absent so the graph supplies Execution.Clock to both reading and mutation. CSRFKeys selects cookie signout; an empty slice disables it, never enables legacy cookie mutation. Bearer signout has no cookie fallback. Resources/callbacks remain borrowed, bounded and concurrent-safe. Construction performs no IO. The retained deployment selects its verified profile; configured OTP and magic-link consuming issuers add their own native read and revoke profiles. Explicit passkey-only composition admits only its native passkey provenance. Selected MagicLink.TOTP additionally composes current confirmed factor authority into both paths; MFA never falls back to a single-factor profile. Every selected issuer shares the store, deployment, policy namespace, audience and readable lookup custody. Cookie-producing issuers also share the cookie policy and their optional signout CSRF keys. Explicit native password bearer issuance instead requires zero cookie and CSRF configuration.

func (SessionConfiguration) Format

func (SessionConfiguration) Format(s fmt.State, _ rune)

Format redacts native key and authority configuration.

func (SessionConfiguration) MarshalJSON

func (SessionConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON denies implicit configuration export.

func (SessionConfiguration) MarshalText

func (SessionConfiguration) MarshalText() ([]byte, error)

MarshalText denies implicit text/map-key export.

type SessionService

SessionService is this graph's narrow read/self-signout/recovery port. Calls require initialized graph custody and an allowed tenant. Cookie signout requires the selected native CSRF profile; bearer signout rejects CSRF and never falls back to cookie authority. Recovery returns historical metadata, not a session, credential, renewed validity or permission to retry execution. Implementations honor earlier deadlines and are concurrent-safe.

type StoreConfiguration

type StoreConfiguration struct {
	// OAuthWorkload selects the configured machine-only native OAuth graph.
	// Nil preserves existing profiles; HTTP selection remains independent.
	OAuthWorkload *OAuthWorkloadConfiguration
	// HTTPOAuthWorkload opts into only the selected workload protocol routes.
	HTTPOAuthWorkload *HTTPOAuthWorkloadConfiguration
	// APIKey selects native modern issuance and optional legacy human-owned keys.
	APIKey *APIKeyConfiguration
	// HTTPAPIKey independently selects strict-bearer management routes.
	HTTPAPIKey *HTTPAPIKeyConfiguration
	// Organization selects explicit verified-password bearer organization owners.
	Organization *OrganizationConfiguration
	// HTTPOrganization independently selects organization routes and metadata.
	HTTPOrganization *HTTPOrganizationConfiguration
	// Passkey explicitly selects native existing-account passkey workflows.
	// Nil exposes no passkey handle, route or method; HTTP stays independent.
	Passkey *PasskeyConfiguration
	// HTTPPasskey opts into selected existing-account passkey HTTP operations.
	HTTPPasskey *HTTPPasskeyConfiguration
	Velocity    VelocityStoreConfiguration
	// DurableAdmission selects durable PostgreSQL-only risk admission. It is
	// mutually exclusive with Velocity and enables no HTTP feature by itself.
	DurableAdmission *DurableAdmissionConfiguration
	// OTP selects public Send and its mandatory delivery owner. Nil preserves
	// the recovery-only profile. No caller evaluator or domain store is accepted.
	OTP      *OTPSendConfiguration
	Delivery *DeliveryConfiguration
	// Migrations enables explicit operator Apply; nil keeps Check/Plan only.
	Migrations *MigrationApplyPolicy
	// HTTPRate selects the owned strong HTTP admission backend and its native
	// migration history. Nil leaves both disabled without changing legacy history.
	HTTPRate *HTTPRateConfiguration
	// HTTPPreAuth explicitly selects the original-flow route for NewServer.
	HTTPPreAuth *HTTPPreAuthConfiguration
	// HTTPEmailSignin explicitly selects email OTP Send/signin/recovery routes.
	HTTPEmailSignin *HTTPEmailSigninConfiguration
	// HTTPEmailOTPVerification independently selects authenticated email OTP.
	HTTPEmailOTPVerification *HTTPEmailOTPVerificationConfiguration
	// HTTPPhoneVerification selects only cookie enrollment/confirmation/recovery.
	HTTPPhoneVerification *HTTPPhoneVerificationConfiguration
	// HTTPEmailOTPChange independently selects genuine-primary email OTP routes.
	HTTPEmailOTPChange *HTTPEmailOTPChangeConfiguration
	// PasswordReset selects native request/completion/recovery over this graph's
	// existing primary risk, delivery and session owners. Nil selects none.
	PasswordReset *PasswordResetConfiguration
	// PhonePasswordReset independently selects the explicitly carrier-risk-
	// accepted SMS plus independent-TOTP recovery profile, not HTTP or signin.
	PhonePasswordReset *PhonePasswordResetConfiguration
	// HTTPPhonePasswordReset opts into its two routes and named recovery flow.
	HTTPPhonePasswordReset *HTTPPhonePasswordResetConfiguration
	// MagicLink selects native request and optional consumption/original flow,
	// not HTTP. It shares this graph's risk, delivery and primary authority.
	MagicLink *MagicLinkConfiguration
	// PasswordSignin selects native login/recovery using graph-owned counted
	// risk and the selected session base, without enabling any HTTP route.
	PasswordSignin *PasswordSigninConfiguration
	// PasswordSignup selects native registration and confirmation, not HTTP.
	PasswordSignup *PasswordSignupConfiguration
	// Username independently selects native username owners; nil leaves all
	// username handles and migrations disabled without changing email profiles.
	Username *UsernameConfiguration
	// Phone selects native existing-account phone enrollment, not HTTP or login.
	Phone *PhoneConfiguration
	// PhoneRemoval independently selects authenticated self-removal and its
	// required old-number notice, not enrollment, login or HTTP.
	PhoneRemoval *PhoneRemovalConfiguration
	// PhoneChange independently selects verified-phone replacement and original
	// recovery. Enrollment, removal and HTTP are not silently enabled.
	PhoneChange *PhoneChangeConfiguration
	// HTTPPhoneChange selects replacement only, independently of enrollment.
	HTTPPhoneChange *HTTPPhoneChangeConfiguration
	// HTTPPhoneRemoval opts into cookie self-removal only, independently of
	// enrollment and the HTTP signin/password-verification selections.
	HTTPPhoneRemoval *HTTPPhoneRemovalConfiguration
	// PhoneSignin independently selects existing verified-phone/password login.
	// Enrollment and its HTTP routes are not dependencies of this selection.
	PhoneSignin *PhoneSigninConfiguration
	// HTTPPhoneSignin enables only phone/password signin and its bound original
	// pre-auth method; the native owner and shared browser admission are required.
	HTTPPhoneSignin *HTTPPasswordSigninConfiguration
	// PhoneOTPSignin independently selects verified-phone SMS-code login.
	PhoneOTPSignin *PhoneOTPSigninConfiguration
	// HTTPPhoneOTPSignin opts into SMS request/signin/recovery and its bound
	// original-flow method. Nil exposes no phone OTP route or metadata.
	HTTPPhoneOTPSignin *HTTPPhoneOTPSigninConfiguration
	// Session selects native primary reads and self-signout, not HTTP.
	Session *SessionConfiguration
	// PasswordVerification selects native reauthentication/proof recovery, not HTTP.
	PasswordVerification *PasswordVerificationConfiguration
	// Email selects native management and/or address queries without HTTP.
	Email *EmailConfiguration
	// HTTPEmailAddresses independently selects safe address reads, not mutations.
	HTTPEmailAddresses *HTTPEmailAddressesConfiguration
	// HTTPEmailRequests independently selects keyed request/confirmation routes.
	HTTPEmailRequests *HTTPEmailRequestsConfiguration
	// MFAEnrollment selects native first-factor enrollment management, not HTTP.
	MFAEnrollment *MFAEnrollmentConfiguration
	// MFAOTPEnrollment independently selects native OTP enrollment, not HTTP or login.
	MFAOTPEnrollment *MFAOTPEnrollmentConfiguration
	// HTTPMFAEnrollment independently selects native cookie enrollment HTTP.
	HTTPMFAEnrollment *HTTPMFAEnrollmentConfiguration
	// HTTPMFAActiveStepUp independently selects authenticated TOTP proof HTTP.
	HTTPMFAActiveStepUp *HTTPMFAActiveStepUpConfiguration
	// HTTPMFARecoveryRegeneration independently selects whole-set replacement HTTP.
	HTTPMFARecoveryRegeneration *HTTPMFARecoveryRegenerationConfiguration
	// HTTPMFAFactorUpdate independently selects native TOTP rename HTTP.
	HTTPMFAFactorUpdate *HTTPMFAFactorUpdateConfiguration
	// HTTPMFADisable independently selects native disable HTTP, never implicitly.
	HTTPMFADisable *HTTPMFADisableConfiguration
	// HTTPMFAList independently selects cookie-only safe factor metadata.
	HTTPMFAList *HTTPMFAListConfiguration
	// PasswordChange selects native keyed replacement over selected verification.
	PasswordChange *PasswordChangeConfiguration
	// HTTPPasswordVerification explicitly selects native reauthentication HTTP.
	HTTPPasswordVerification *HTTPPasswordProtectionConfiguration
	// HTTPPasswordChange independently selects native keyed replacement HTTP.
	HTTPPasswordChange *HTTPPasswordProtectionConfiguration
	// HTTPSession explicitly selects native session read/self-signout routes.
	HTTPSession *HTTPSessionConfiguration
	// HTTPPasswordReset independently selects request/completion routes. Native
	// reset, strict HTTP rate and the original browser-device issuer are required.
	HTTPPasswordReset *HTTPPasswordResetConfiguration
	// HTTPPasswordSignin explicitly selects browser login and its named original
	// flow method. Native signin/PreAuth, rate and device owners are required.
	HTTPPasswordSignin *HTTPPasswordSigninConfiguration
	// HTTPPasswordSignup explicitly selects browser signup, not confirmation.
	HTTPPasswordSignup *HTTPPasswordSignupConfiguration
	// HTTPUsername independently selects native username routes and flow methods.
	HTTPUsername *HTTPUsernameConfiguration
	// HTTPRegistrationVerification explicitly selects confirmation, not signup.
	HTTPRegistrationVerification *HTTPRegistrationVerificationConfiguration
	// HTTPMagicLink independently selects native magic-link routes and the named
	// original-flow method, requiring real strict rate and signed device custody.
	HTTPMagicLink *HTTPMagicLinkConfiguration
	// HTTPMFA explicitly selects native TOTP completion transport, not other MFA
	// routes. Original pre-auth/device, TOTP and strict rate owners are required.
	HTTPMFA *HTTPMFAConfiguration
	// Anonymous selects native unprivileged guest owners, not HTTP.
	Anonymous *AnonymousConfiguration
	// HTTPAnonymous independently opts into selected guest routes and read.
	HTTPAnonymous *HTTPAnonymousConfiguration
}

StoreConfiguration contains selected adapter configuration exactly once. Select exactly one of Velocity and DurableAdmission. OTP and Delivery must be selected together. Zero is invalid. Construction copies configuration. Concurrent input mutation during construction is forbidden. No optional feature is silently enabled.

func (StoreConfiguration) Format

func (StoreConfiguration) Format(s fmt.State, _ rune)

func (StoreConfiguration) MarshalJSON

func (StoreConfiguration) MarshalJSON() ([]byte, error)

func (StoreConfiguration) MarshalText

func (StoreConfiguration) MarshalText() ([]byte, error)

type StoreSet

type StoreSet struct {
	// contains filtered or unexported fields
}

StoreSet is sealed deployment composition. Copies share one lifetime and immutable configuration. RecoverVelocity is concurrent-safe across tenants; concurrent same-tenant attempts fail rather than queue unbounded work. The caller owns Close. Zero grants no authority and can be safely closed.

func ComposeStores

ComposeStores validates/copies deployment configuration without network IO, migrations or goroutines. It creates exactly one native custody graph and configures the concrete primary adapter with that graph's paired authorities. It does not enable traffic: RecoverVelocity must establish real covered journal history and native-confirmed activation. Invalid input is redacted.

Example
package main

import (
	"fmt"

	"github.com/faustbrian/go-identity/reference"
)

func main() {
	// Incomplete deployment resources never silently construct healthy stores.
	_, err := reference.ComposeStores(reference.StoreConfiguration{}, reference.ReferenceDependencies{})
	fmt.Println(err)
}
Output:
risk: invalid policy

func (StoreSet) BootstrapOAuthWorkloads

func (s StoreSet) BootstrapOAuthWorkloads(ctx context.Context) error

BootstrapOAuthWorkloads explicitly initializes only the configured machine authority scopes at epoch one in one transaction, before Initialize. It is a trusted offline operator operation, never an HTTP handler or startup repair. Migrations and the public composition stages must already be complete. Existing epochs return Conflict and are never reset, even when greater than one. Missing/unavailable directory authority denies without initialization.

A commit error returns Unavailable, not success. The operator can reconcile by calling Initialize, which reads every actual scope without creating one. Requests are bounded by native MaximumDuration and StoreSet's lifetime; concurrent bootstrap/Initialize and calls after Close are denied.

func (StoreSet) Close

func (s StoreSet) Close(ctx context.Context) error

Close permanently denies new recovery, cancels active primary/native work, closes owned native connections and joins recovery within ctx. It never closes the caller's pool. A timeout leaves closure permanent; repeat Close may finish waiting. No lock spans IO or waiting. Nil ctx is invalid.

func (StoreSet) Format

func (StoreSet) Format(s fmt.State, _ rune)

func (StoreSet) MarshalJSON

func (StoreSet) MarshalJSON() ([]byte, error)

func (StoreSet) MarshalText

func (StoreSet) MarshalText() ([]byte, error)

func (StoreSet) MigrationSource

func (s StoreSet) MigrationSource() migrations.Source

MigrationSource returns this selected store graph's immutable upstream-owned histories for the existing go-migrations runner. It performs no IO or apply. Kernel versions remain 1..9; reference reserves 1000..1011 permanently for the velocity authority chain. Existing adapter deployments using other allocations are not silently adopted. This partial development profile does not implement the complete reference Check/Plan/Apply migration coordinator. Selected OTP/delivery appends permanent allocations after that existing prefix: kernel 1012..1018 (1019 additionally for selected native TOTP), OTP 1100..1103, pre-auth sessions 1200..1201, distinct authenticated sessions 1210, delivery 1250..1260 and authorization authority 1300. All SQL is supplied by its owner. Shared session schemas reuse the same base; unselected profiles contribute no schema. Optional consuming Signin appends OTP 1400 and session 1411..1416, plus 1410 only when its session schema is distinct from the selected session bases. Selected original-flow initiation contributes its independent identity_preauth history through reference Check/Plan/Apply, not this shared source. Selected HTTP rate admission likewise contributes the native rate-limit identity_http_rate history through Check/Plan/Apply, not this shared source. Audit and outbox independent histories are not part of this shared source; their installation remains required before enabling the selected workflow.

func (StoreSet) RecoverVelocity

func (s StoreSet) RecoverVelocity(ctx context.Context, tenant string) (store risk.CounterStore, err error)

RecoverVelocity performs one explicit bounded recovery, never background retry or an implicit debit. It starts a fresh primary-owned generation and restores original authenticated terminal history from zero. Unknown/pending history, lost acknowledgements, incomplete coverage, concurrent ownership or exhausted budgets return no store. Empty fresh storage is unavailable for a genuine full hour of journal coverage; no timestamp is backdated here. Success returns the exact activated pair's CounterStore, whose later calls recheck primary/native eligibility without resetting original expiry. There is no healthy-lease renewal. After expiry another explicit recovery is needed. A newly composed owner cannot adopt a predecessor's opaque native marker; cross-process reconciliation remains unimplemented and fails closed.

func (StoreSet) ReferenceMigrationApply

func (s StoreSet) ReferenceMigrationApply(ctx context.Context, input ReferenceMigrationApplyRequest) (out ReferenceMigrationApplyResult, failure error)

ReferenceMigrationApply executes only an exact independently rebuilt plan. It holds one native global lock/connection from discovery through every namespace and checkpoint. Before any write it validates all current histories, selected guards, original sources and the full plan, not merely its digest. Only native transactional receipts explain a same-command prefix; externally matching schema/history is never adopted. Each batch commits native SQL, ledger and attribution together. Audit fresh preflight/history is one batch.

Apply is disabled without an explicit operator policy. It never starts during construction/Check/Plan. Calls join Close's cancellation/drain lifetime and share no in-memory execution authority. Retry the exact original request to reconcile unknown outcomes; no new command/key/plan can claim that progress. The borrowed pool remains open. Cleanup uses its finite independent budget.

func (StoreSet) ReferenceMigrationCheck

ReferenceMigrationCheck discovers selected native histories without preparing ledgers, acquiring apply locks, migrating, baselining or initializing features. Each requested owner's complete physical history participates in validation, including shared-ledger prerequisites; only requested statuses are returned. Missing history with owned objects is incompatible, never permission for silent adoption.

One PrimaryTimeout bounds the whole check. Calls are concurrent-safe and join the store lifetime: Close cancels/drains them. The borrowed PostgreSQL pool remains open. Invalid inputs, cancellation and dependency failures return no partial statuses; errors redact database diagnostics. A discovered dirty or incompatible history returns explicit status, not healthy readiness. This store operation supports the future ReferenceService/server facade; it does not implement the complete service, Apply or command recovery.

func (StoreSet) ReferenceMigrationPlan

ReferenceMigrationPlan plans native migration work without preparing ledgers, acquiring apply ownership or changing schema. It is bounded by PrimaryTimeout and the store lifetime. This operation does not implement Apply or recovery.

type TenantPolicy

type TenantPolicy struct{ Resolver TenantResolver }

TenantPolicy requires one trusted tenant resolver; nil and typed nil deny.

type TenantResolver

type TenantResolver interface {
	ResolveTenant(context.Context) (identity.TenantID, error)
}

TenantResolver resolves only trusted context/deployment custody, honors the bounded caller context, and supports concurrent calls. Server checks its result against actual configured network facts before any workflow dispatch.

type UsernameConfiguration

type UsernameConfiguration struct {
	Policy         *username.Policy
	Signup, Signin bool
	Availability   *passwordpg.UsernameAvailabilityConfig
	Rename         *UsernameRenameConfiguration
	// TOTP selects the complete username-origin challenge/completion profile.
	// Signin must be selected; no recovery, OTP or trusted-device fallback follows.
	TOTP *UsernameTOTPConfiguration
}

UsernameConfiguration independently selects native username operations, not HTTP. Signup and Signin reuse the configured password owners' immutable keys/policies with distinct username actions; the email owners stay selected unchanged. Policy is frozen by each native owner. Without TOTP, username signin requires authoritative known-empty MFA; it never bypasses enrolled factors. Availability and Rename supply native configuration, not consumer stores. The graph supplies its pool, counted evaluator and original proof source. Borrowed callbacks must be bounded/concurrent-safe and outlive graph calls.

func (UsernameConfiguration) Format

func (UsernameConfiguration) Format(s fmt.State, _ rune)

Format redacts policy and native key custody.

func (UsernameConfiguration) LogValue

func (UsernameConfiguration) LogValue() slog.Value

LogValue redacts policy and native key custody.

func (UsernameConfiguration) MarshalJSON

func (UsernameConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON refuses implicit configuration export.

func (UsernameConfiguration) MarshalText

func (UsernameConfiguration) MarshalText() ([]byte, error)

MarshalText refuses implicit configuration export.

type UsernameRenameConfiguration

type UsernameRenameConfiguration struct {
	Primary passwordpg.ActionPrimaryConfig
	Native  passwordpg.UsernameRenameConfig
}

UsernameRenameConfiguration selects the existing action-specific password proof owner and atomic native rename. Primary.Action must be exactly identity.username.update; Native.Risk.Evaluation must be zero for injection from this graph. Counters.CommandCounters must retain the exact policy value selected by Velocity.Native.Policy or DurableAdmission.Policy, not a newly constructed equivalent. Transport and retained CSRF keys remain explicit.

func (UsernameRenameConfiguration) Format

Format redacts action proof and native key custody.

func (UsernameRenameConfiguration) LogValue

LogValue redacts action proof and native key custody.

func (UsernameRenameConfiguration) MarshalJSON

func (UsernameRenameConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON refuses implicit configuration export.

func (UsernameRenameConfiguration) MarshalText

func (UsernameRenameConfiguration) MarshalText() ([]byte, error)

MarshalText refuses implicit configuration export.

type UsernameRenameService

type UsernameRenameService interface {
	username.RenameService
	username.RenameRateSource
}

UsernameRenameService retains original native mutation/recovery and custody authentication for callers composing shared transport rate admission.

type UsernameTOTPConfiguration

type UsernameTOTPConfiguration struct {
	Challenge  passwordpg.MFAChallengeConfig
	Completion PasswordTOTPConfiguration
}

UsernameTOTPConfiguration explicitly composes genuine username/password comparison with confirmed TOTP through the existing native owners. Challenge only allows totp and Completion retains PasswordTOTPConfiguration's bounded counter, envelope and key custody. Neither selection enables HTTP by itself.

func (UsernameTOTPConfiguration) Format

func (UsernameTOTPConfiguration) Format(s fmt.State, _ rune)

Format redacts challenge and completion keys for every formatting verb.

func (UsernameTOTPConfiguration) LogValue

LogValue redacts challenge and completion configuration.

func (UsernameTOTPConfiguration) MarshalJSON

func (UsernameTOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON refuses implicit secret-bearing configuration export.

func (UsernameTOTPConfiguration) MarshalText

func (UsernameTOTPConfiguration) MarshalText() ([]byte, error)

MarshalText refuses implicit textual configuration export.

type VelocityStoreConfiguration

type VelocityStoreConfiguration struct {
	Native          riskvalkey.VelocityRecoveryConfig
	Schema          string
	Tenants         []string
	PrimaryTimeout  time.Duration
	LeaseDuration   time.Duration
	RecoveryTimeout time.Duration
	Batch           int
	MaxRecords      int
}

VelocityStoreConfiguration selects one primary/native recovery pair. Native owns namespace, replay secret, policy, key history and transport configuration; the primary uses those exact values rather than separately selected custody. Tenants is a unique allowlist of 1..128 deployment scopes. Schema must satisfy the PostgreSQL adapter. PrimaryTimeout is positive and at most one minute. LeaseDuration is positive, microsecond-representable and at most one minute. RecoveryTimeout is positive and less than LeaseDuration. Batch is 1..1000 (reference default 100); MaxRecords is 1..100000. Bounds are explicit: zero never silently enables defaults, retries or a healthy initial state.

func (VelocityStoreConfiguration) Format

func (VelocityStoreConfiguration) MarshalJSON

func (VelocityStoreConfiguration) MarshalJSON() ([]byte, error)

func (VelocityStoreConfiguration) MarshalText

func (VelocityStoreConfiguration) MarshalText() ([]byte, error)

type VerificationSessionLineage

type VerificationSessionLineage uint8

VerificationSessionLineage identifies immutable shipped session history. Choosing the wrong lineage fails migration compatibility; it never rewrites an applied checksum or infers history from current authentication toggles.

const (
	// VerificationBeforeMFA retains the verification-only v7 issuance prefix,
	// then adds a new forward MFA session suffix. Use for verification-first DBs.
	VerificationBeforeMFA VerificationSessionLineage = iota + 1
	// MFABeforeVerification retains the shipped MFA v6 then verification v7
	// sequence. Use only for databases originally installed in that order.
	MFABeforeVerification
)

type VerificationTOTPConfiguration

type VerificationTOTPConfiguration MagicLinkTOTPConfiguration

VerificationTOTPConfiguration selects original-browser TOTP completion after separately committed registration verification and challenge issuance. Fields retain the bounded counters, envelope and comparison-key contracts of native TOTP completion. The graph supplies the actual verification primary, risk, original signup cookie keys and session authority. No HTTP route, password/ magic-link primary, recovery method or trusted-device policy is selected.

func (VerificationTOTPConfiguration) Format

Format redacts secret-bearing startup configuration.

func (VerificationTOTPConfiguration) LogValue

LogValue redacts structured diagnostics.

func (VerificationTOTPConfiguration) MarshalJSON

func (VerificationTOTPConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON rejects implicit startup custody export.

func (VerificationTOTPConfiguration) MarshalText

func (VerificationTOTPConfiguration) MarshalText() ([]byte, error)

MarshalText rejects implicit textual custody export.

type WorkerPolicy

type WorkerPolicy struct {
	MaxConcurrency              uint32
	LeaseDuration, DrainTimeout time.Duration
}

WorkerPolicy bounds cross-worker capacity, lease and shutdown drain. Workers remain explicitly scheduled through the graph; construction starts none.

type WorkerSet

type WorkerSet struct {
	// contains filtered or unexported fields
}

WorkerSet retains actual delivery workers and their concurrency ceilings. ProcessDeliveryOne is explicitly scheduled: construction starts no worker. Copies share the exact owners; indexes are fixed by ComposeWorkers input.

func ComposeWorkers

func ComposeWorkers(stores StoreSet, providers ProviderSet, configs ...deliverypg.WorkerConfig) (WorkerSet, error)

ComposeWorkers requires zero configs when delivery is unselected; otherwise it composes 1..128 real bounded native delivery workers from the selected provider and store graph. Each selected tenant must have a worker for the OTP provider and any independently selected phone provider. Duplicate tenant/provider pairs deny. Native scope and current authorization policy requirements are validated by the owning adapter. All construction is pure; unsuccessful validation leaves the stage retryable.

func (WorkerSet) Format

func (WorkerSet) Format(s fmt.State, _ rune)

func (WorkerSet) MarshalJSON

func (WorkerSet) MarshalJSON() ([]byte, error)

func (WorkerSet) MarshalText

func (WorkerSet) MarshalText() ([]byte, error)

func (WorkerSet) ProcessDeliveryOne

func (w WorkerSet) ProcessDeliveryOne(ctx context.Context, index int) (delivery.ProcessResult, error)

ProcessDeliveryOne performs one selected native worker step. No polling loop or automatic retry is created. Startup and shutdown apply to retained handles; the original native result preserves unknown sends and committed checkpoints.

Source Files

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL