Directories
¶
| Path | Synopsis |
|---|---|
|
Package account exposes the /account/* end-user self-service endpoints (agents the user owns and delegation grants the user has issued).
|
Package account exposes the /account/* end-user self-service endpoints (agents the user owns and delegation grants the user has issued). |
|
Package admin exposes the /admin/v1 organization-scoped admin API: user / session / role / audit / oauth-account management.
|
Package admin exposes the /admin/v1 organization-scoped admin API: user / session / role / audit / oauth-account management. |
|
Package agent owns the v2.0 agent identity lifecycle: CreateAgent, MintAgentCredential, RotateAgentSecret, ListAgentsByOwner, GetAgent, SuspendAgent, ResumeAgent, RevokeAgent, and the agentBySubjectClaim resolver consulted by internal/as.
|
Package agent owns the v2.0 agent identity lifecycle: CreateAgent, MintAgentCredential, RotateAgentSecret, ListAgentsByOwner, GetAgent, SuspendAgent, ResumeAgent, RevokeAgent, and the agentBySubjectClaim resolver consulted by internal/as. |
|
handlers
Package handlers exposes the organization-scoped agent + delegation administration endpoints mounted under /admin/v1/organizations/{orgID}/agents and .../delegations.
|
Package handlers exposes the organization-scoped agent + delegation administration endpoints mounted under /admin/v1/organizations/{orgID}/agents and .../delegations. |
|
Package apitokens implements scoped API tokens, the RFC 8628 device grant, agent tokens and the HTTP routes and middleware around them.
|
Package apitokens implements scoped API tokens, the RFC 8628 device grant, agent tokens and the HTTP routes and middleware around them. |
|
Package as owns the OAuth 2.1 + MCP authorization server runtime: the JWKS state machine and key rotation goroutine, the /oauth/authorize + /oauth/token + /oauth/revoke + /oauth/introspect service code, dynamic client registration (RFC 7591), AS metadata documents (RFC 8414 + RFC 9728), and the RFC 8693 token-exchange grant.
|
Package as owns the OAuth 2.1 + MCP authorization server runtime: the JWKS state machine and key rotation goroutine, the /oauth/authorize + /oauth/token + /oauth/revoke + /oauth/introspect service code, dynamic client registration (RFC 7591), AS metadata documents (RFC 8414 + RFC 9728), and the RFC 8693 token-exchange grant. |
|
handlers
Package handlers exposes the OAuth 2.1 + MCP authorization server HTTP endpoints.
|
Package handlers exposes the OAuth 2.1 + MCP authorization server HTTP endpoints. |
|
Package audit defines the audit-emission interface that internal service packages depend on.
|
Package audit defines the audit-emission interface that internal service packages depend on. |
|
Package authevents defines the PII-minimal authentication event stream.
|
Package authevents defines the PII-minimal authentication event stream. |
|
Package bootstrap gates creation of the first user behind a one-time setup token.
|
Package bootstrap gates creation of the first user behind a one-time setup token. |
|
Package chain provides pure helpers for RFC 8693 actor chain validation: depth counting, scope subset checking, duration narrowing, and act-claim construction.
|
Package chain provides pure helpers for RFC 8693 actor chain validation: depth counting, scope subset checking, duration narrowing, and act-claim construction. |
|
Package cimd implements RFC draft "Client ID Metadata Documents" (CIMD) per the MCP Authorization specification 2025-11-25.
|
Package cimd implements RFC draft "Client ID Metadata Documents" (CIMD) per the MCP Authorization specification 2025-11-25. |
|
Package clientauthcache caches the result of an OAuth client_secret verification (Argon2id PHC compare) so that hot endpoints (introspect, token, revoke) do not pay the ~27ms Argon2 cost on every request.
|
Package clientauthcache caches the result of an OAuth client_secret verification (Argon2id PHC compare) so that hot endpoints (introspect, token, revoke) do not pay the ~27ms Argon2 cost on every request. |
|
Package delegation owns the v2.0 delegation_grants lifecycle: GrantDelegation, ListDelegationsForUser, ListDelegationsForAgent, RevokeDelegation, and the canonical Active + NarrowScope helpers consulted by the AS token-exchange and introspection paths.
|
Package delegation owns the v2.0 delegation_grants lifecycle: GrantDelegation, ListDelegationsForUser, ListDelegationsForAgent, RevokeDelegation, and the canonical Active + NarrowScope helpers consulted by the AS token-exchange and introspection paths. |
|
Package doctor evaluates security-posture checks over a plain input struct.
|
Package doctor evaluates security-posture checks over a plain input struct. |
|
Package dpop implements RFC 9449 Demonstrating Proof-of-Possession (DPoP) for OAuth 2.0 / OAuth 2.1 sender-constrained access tokens.
|
Package dpop implements RFC 9449 Demonstrating Proof-of-Possession (DPoP) for OAuth 2.0 / OAuth 2.1 sender-constrained access tokens. |
|
Package emailnorm canonicalizes email addresses so uniqueness checks and lookups agree regardless of case, surrounding whitespace, or Unicode compatibility forms.
|
Package emailnorm canonicalizes email addresses so uniqueness checks and lookups agree regardless of case, surrounding whitespace, or Unicode compatibility forms. |
|
Package httpsec holds the Secure cookie rewriting and the Origin allowlist check.
|
Package httpsec holds the Secure cookie rewriting and the Origin allowlist check. |
|
Package httpx hosts shared HTTP helpers used by extracted handler packages: the canonical sentinel-error to status mapping, the {code,message} JSON error body, the URL-param ULID parser, and the no-trust client IP shim.
|
Package httpx hosts shared HTTP helpers used by extracted handler packages: the canonical sentinel-error to status mapping, the {code,message} JSON error body, the URL-param ULID parser, and the no-trust client IP shim. |
|
Package identitylink owns the three identity-linking service methods (v2.3): LinkOAuthToCurrentUser, LinkPasswordToCurrentUser, MergeAccounts.
|
Package identitylink owns the three identity-linking service methods (v2.3): LinkOAuthToCurrentUser, LinkPasswordToCurrentUser, MergeAccounts. |
|
Package importer inserts accounts, TOTP secrets and passkeys migrated from another system.
|
Package importer inserts accounts, TOTP secrets and passkeys migrated from another system. |
|
Package jwt implements the minimum JWT surface required by the v2.0 authorization server: Ed25519 (EdDSA) sign and verify for access tokens shaped per RFC 9068 (typ = "at+jwt").
|
Package jwt implements the minimum JWT surface required by the v2.0 authorization server: Ed25519 (EdDSA) sign and verify for access tokens shaped per RFC 9068 (typ = "at+jwt"). |
|
Package magiclink owns the request / consume flow for email-delivered magic-link sign-in tokens.
|
Package magiclink owns the request / consume flow for email-delivered magic-link sign-in tokens. |
|
Package models is the internal home for the theauth-go data layer: persisted entity structs (User, Session, OAuthClient, Agent, ...), the canonical Permission name catalog, and the sentinel errors that storage adapters and service code share.
|
Package models is the internal home for the theauth-go data layer: persisted entity structs (User, Session, OAuthClient, Agent, ...), the canonical Permission name catalog, and the sentinel errors that storage adapters and service code share. |
|
Package oauth owns the user-facing OAuth 2.0 login state machine: PKCE state generation at /start and code exchange at /callback.
|
Package oauth owns the user-facing OAuth 2.0 login state machine: PKCE state generation at /start and code exchange at /callback. |
|
handlers
Package handlers exposes the /auth/providers/{name}/start and /auth/providers/{name}/callback endpoints for user-facing OAuth login (Google, GitHub, Discord, Microsoft).
|
Package handlers exposes the /auth/providers/{name}/start and /auth/providers/{name}/callback endpoints for user-facing OAuth login (Google, GitHub, Discord, Microsoft). |
|
Package observability is the pluggable tracing + metrics adapter surface the theauth-go library uses to expose spans and counters without pulling in OpenTelemetry, Prometheus, or any other vendor as a hard dependency.
|
Package observability is the pluggable tracing + metrics adapter surface the theauth-go library uses to expose spans and counters without pulling in OpenTelemetry, Prometheus, or any other vendor as a hard dependency. |
|
Package organizations owns the create / read / member-management surface for multi-tenant organizations.
|
Package organizations owns the create / read / member-management surface for multi-tenant organizations. |
|
handlers
Package handlers exposes the /auth/orgs/* HTTP endpoints for multi-tenant organization create / read / membership management.
|
Package handlers exposes the /auth/orgs/* HTTP endpoints for multi-tenant organization create / read / membership management. |
|
Package password owns the email + password signup / signin / reset flow, including the Argon2id hash + verify cost (paid even on user-not-found to equalise signin timing per security audit M6), the magic-link-backed reset, and the TOTP-step-up gate that mints a pending_2fa session when the user has a confirmed second factor.
|
Package password owns the email + password signup / signin / reset flow, including the Argon2id hash + verify cost (paid even on user-not-found to equalise signin timing per security audit M6), the magic-link-backed reset, and the TOTP-step-up gate that mints a pending_2fa session when the user has a confirmed second factor. |
|
handlers
Package handlers exposes the /auth/email-password/* HTTP endpoints for password signup, signin, forgot, and reset.
|
Package handlers exposes the /auth/email-password/* HTTP endpoints for password signup, signin, forgot, and reset. |
|
Package pathprefix holds the route prefix default and validation shared by the root package and the internal service packages.
|
Package pathprefix holds the route prefix default and validation shared by the root package and the internal service packages. |
|
Package ratelimit holds the per-key request limiter and the trusted-proxy aware client IP helpers.
|
Package ratelimit holds the per-key request limiter and the trusted-proxy aware client IP helpers. |
|
Package rbac owns the v1.0 role + permission management surface: permission seeding, organization-scoped role CRUD, grant / revoke, and the HasPermission / PermissionsForUser checks consumed by middleware.
|
Package rbac owns the v1.0 role + permission management surface: permission seeding, organization-scoped role CRUD, grant / revoke, and the HasPermission / PermissionsForUser checks consumed by middleware. |
|
Package revocation carries credential revocation events, the bus that fans them out, and the watcher that cancels a context when one matches.
|
Package revocation carries credential revocation events, the bus that fans them out, and the watcher that cancels a context when one matches. |
|
Package saml's Service owns the v0.7 SAML SP surface: connection CRUD, SP-initiated login (BeginLogin), the ACS endpoint backend (FinishLogin), the per-connection SP metadata serialiser (MetadataXML), the in-memory AuthnRequest tracker for replay protection, and the GC goroutine that sweeps expired AuthnRequest IDs.
|
Package saml's Service owns the v0.7 SAML SP surface: connection CRUD, SP-initiated login (BeginLogin), the ACS endpoint backend (FinishLogin), the per-connection SP metadata serialiser (MetadataXML), the in-memory AuthnRequest tracker for replay protection, and the GC goroutine that sweeps expired AuthnRequest IDs. |
|
handlers
Package handlers exposes the SAML SP-flow endpoints (/auth/saml/{connectionId}/login, /acs, /metadata).
|
Package handlers exposes the SAML SP-flow endpoints (/auth/saml/{connectionId}/login, /acs, /metadata). |
|
Package samltest provides an in-process SAML IdP for end-to-end testing of the SP integration.
|
Package samltest provides an in-process SAML IdP for end-to-end testing of the SP integration. |
|
Package scim holds the small SCIM parsing helpers that the root theauth package uses internally but does not export.
|
Package scim holds the small SCIM parsing helpers that the root theauth package uses internally but does not export. |
|
handlers
Package handlers exposes the /scim/v2/* SCIM 2.0 resource and discovery endpoints, plus the per-organization SCIM token CRUD endpoints mounted under /auth/orgs/{orgId}/scim/tokens.
|
Package handlers exposes the /scim/v2/* SCIM 2.0 resource and discovery endpoints, plus the per-organization SCIM token CRUD endpoints mounted under /auth/orgs/{orgId}/scim/tokens. |
|
Package session owns the Issue / Validate primitives for opaque session tokens.
|
Package session owns the Issue / Validate primitives for opaque session tokens. |
|
Package storagestub holds capability stubs that report ErrStorageMissingCapability.
|
Package storagestub holds capability stubs that report ErrStorageMissingCapability. |
|
Package testhooks lets black-box tests reach unexported root behavior without widening the public API.
|
Package testhooks lets black-box tests reach unexported root behavior without widening the public API. |
|
Package theauthtest provides shared test helpers for building TheAuth instances and creating users in tests across internal packages.
|
Package theauthtest provides shared test helpers for building TheAuth instances and creating users in tests across internal packages. |
|
Package throttle implements login and MFA attempt limiting: per (IP, identifier) exponential backoff after a grace period, plus per-key lockout with automatic expiry.
|
Package throttle implements login and MFA attempt limiting: per (IP, identifier) exponential backoff after a grace period, plus per-key lockout with automatic expiry. |
|
Package totp owns the v0.5 second-factor TOTP surface: enrollment (BeginEnrollment + FinishEnrollment), verification (Verify), and the recovery-code path (ConsumeRecoveryCode).
|
Package totp owns the v0.5 second-factor TOTP surface: enrollment (BeginEnrollment + FinishEnrollment), verification (Verify), and the recovery-code path (ConsumeRecoveryCode). |
|
handlers
Package handlers exposes the /auth/totp/* HTTP endpoints for TOTP 2FA enrollment, verification, recovery, and removal.
|
Package handlers exposes the /auth/totp/* HTTP endpoints for TOTP 2FA enrollment, verification, recovery, and removal. |
|
Package wavt is the WebAuthn virtual test helper used to drive the v0.5 passkey ceremony tests.
|
Package wavt is the WebAuthn virtual test helper used to drive the v0.5 passkey ceremony tests. |
|
Package webauthn owns the v0.5 passkey (FIDO2 / WebAuthn L3) surface: registration ceremonies (BeginRegistration + FinishRegistration), login ceremonies (BeginLogin + FinishLogin), the in-memory sync.Map for in-flight challenges, and the GC goroutine that sweeps expired challenges.
|
Package webauthn owns the v0.5 passkey (FIDO2 / WebAuthn L3) surface: registration ceremonies (BeginRegistration + FinishRegistration), login ceremonies (BeginLogin + FinishLogin), the in-memory sync.Map for in-flight challenges, and the GC goroutine that sweeps expired challenges. |
|
handlers
Package handlers exposes the /auth/webauthn/* HTTP endpoints for passkey registration, authentication, and credential management.
|
Package handlers exposes the /auth/webauthn/* HTTP endpoints for passkey registration, authentication, and credential management. |
Click to show internal directories.
Click to hide internal directories.