Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
Package api embeds the OpenAPI assets the auth0-mock binary needs: the Auth0 Management API skeleton (input to the bundler) and the merged OpenAPI document served at /openapi.json.
|
Package api embeds the OpenAPI assets the auth0-mock binary needs: the Auth0 Management API skeleton (input to the bundler) and the merged OpenAPI document served at /openapi.json. |
|
cmd
|
|
|
api
command
Command auth0-mock is the entry point for the auth0-mock service.
|
Command auth0-mock is the entry point for the auth0-mock service. |
|
genopenapi
command
Command genopenapi bundles the embedded Auth0 Management API skeleton, the per-package OpenAPI fragments shipped by each surface (authapi, admin0, router service endpoints) into a single OpenAPI 3.1 document.
|
Command genopenapi bundles the embedded Auth0 Management API skeleton, the per-package OpenAPI fragments shipped by each surface (authapi, admin0, router service endpoints) into a single OpenAPI 3.1 document. |
|
features
|
|
|
scenario
Package scenario holds the godog test harness: a per-scenario context that boots the auth0-mock service in-process on a random port and provides HTTP helpers for the .feature step files.
|
Package scenario holds the godog test harness: a per-scenario context that boots the auth0-mock service in-process on a random port and provides HTTP helpers for the .feature step files. |
|
internal
|
|
|
admin0
Package admin0 exposes the mock's control-plane endpoints under /admin0/*.
|
Package admin0 exposes the mock's control-plane endpoints under /admin0/*. |
|
authapi
Package authapi mounts hand-coded Auth0 Authentication API endpoints onto chi.
|
Package authapi mounts hand-coded Auth0 Authentication API endpoints onto chi. |
|
authorizeerr
Package authorizeerr keeps the in-memory rules that make /authorize fail on purpose: a rule with an optional match on the /authorize query returns an OAuth error to the redirect_uri instead of logging the user in.
|
Package authorizeerr keeps the in-memory rules that make /authorize fail on purpose: a rule with an optional match on the /authorize query returns an OAuth error to the redirect_uri instead of logging the user in. |
|
bearer
Package bearer provides middleware that validates an Authorization: Bearer JWT against a jwks.KeySet and attaches the claims to the request context.
|
Package bearer provides middleware that validates an Authorization: Bearer JWT against a jwks.KeySet and attaches the claims to the request context. |
|
claims
Package claims owns a per-process map of custom JWT claims that get merged into every access token minted by the authapi package.
|
Package claims owns a per-process map of custom JWT claims that get merged into every access token minted by the authapi package. |
|
clock
Package clock provides a pluggable Now() time source so the mock's protocol-time outputs (JWT iat/exp, code/OTP TTLs, bearer validation) can be frozen or skewed at runtime via /admin0/clock for deterministic tests.
|
Package clock provides a pluggable Now() time source so the mock's protocol-time outputs (JWT iat/exp, code/OTP TTLs, bearer validation) can be frozen or skewed at runtime via /admin0/clock for deterministic tests. |
|
config
Package config loads runtime settings from environment variables.
|
Package config loads runtime settings from environment variables. |
|
events
Package events owns the in-process Server-Sent Events hub for the mock's GET /events endpoint.
|
Package events owns the in-process Server-Sent Events hub for the mock's GET /events endpoint. |
|
httperr
Package httperr writes JSON error responses in either Auth0 Management API shape or Auth0 Authentication API shape.
|
Package httperr writes JSON error responses in either Auth0 Management API shape or Auth0 Authentication API shape. |
|
journal
Package journal records Management API calls in a bounded in-memory ring so tests can assert on what the application under test actually sent.
|
Package journal records Management API calls in a bounded in-memory ring so tests can assert on what the application under test actually sent. |
|
jwks
Package jwks owns the in-process RS256 signing key, JWT minting, JWT verification, and JWKS publication.
|
Package jwks owns the in-process RS256 signing key, JWT minting, JWT verification, and JWKS publication. |
|
logger
Package logger constructs the project's zerolog.Logger.
|
Package logger constructs the project's zerolog.Logger. |
|
matches
Package matches owns the in-memory store of registered mock expectations.
|
Package matches owns the in-memory store of registered mock expectations. |
|
mfa
Package mfa implements the in-memory state for Auth0's MFA challenge dance.
|
Package mfa implements the in-memory state for Auth0's MFA challenge dance. |
|
mgmtapi
Package mgmtapi mounts the spec-driven Management API surface onto chi: one generic, bearer-protected handler per Auth0 Management API operation.
|
Package mgmtapi mounts the spec-driven Management API surface onto chi: one generic, bearer-protected handler per Auth0 Management API operation. |
|
middleware
Package middleware contains shared net/http middleware.
|
Package middleware contains shared net/http middleware. |
|
permissions
Package permissions owns a per-audience map of permission strings.
|
Package permissions owns a per-audience map of permission strings. |
|
pkce
Package pkce implements the in-memory store of per-code authorization state that links a /authorize redirect to its later /oauth/token exchange.
|
Package pkce implements the in-memory store of per-code authorization state that links a /authorize redirect to its later /oauth/token exchange. |
|
router
Package router builds the http.Handler that fronts the mock service.
|
Package router builds the http.Handler that fronts the mock service. |
|
seed
Package seed loads a YAML or JSON seed file into the mock's in-memory stores: expectations, claims, claim mappings, permissions and the MFA flag.
|
Package seed loads a YAML or JSON seed file into the mock's in-memory stores: expectations, claims, claim mappings, permissions and the MFA flag. |
|
server
Package server hosts the HTTP and (later) HTTPS listeners.
|
Package server hosts the HTTP and (later) HTTPS listeners. |
|
session
Package session keeps the in-memory state that ties a logged-in user to the tokens the mock has issued, so later requests (/userinfo) can see the same user the id_token described.
|
Package session keeps the in-memory state that ties a logged-in user to the tokens the mock has issued, so later requests (/userinfo) can see the same user the id_token described. |
|
spec
Package spec wraps the embedded Auth0 Management API skeleton.
|
Package spec wraps the embedded Auth0 Management API skeleton. |
|
tlscert
Package tlscert produces a *tls.Config from either user-supplied cert/key files or an auto-generated self-signed cert covering configured hostnames.
|
Package tlscert produces a *tls.Config from either user-supplied cert/key files or an auto-generated self-signed cert covering configured hostnames. |
|
tmpl
Package tmpl parses and renders response templates: JSON bodies and header values that hold {{uuid}}, {{now}}, {{path.NAME}} and {{body.PATH}} placeholders.
|
Package tmpl parses and renders response templates: JSON bodies and header values that hold {{uuid}}, {{now}}, {{path.NAME}} and {{body.PATH}} placeholders. |
|
version
Package version exposes build-time metadata baked into the binary at link time via `-ldflags="-X ..."`.
|
Package version exposes build-time metadata baked into the binary at link time via `-ldflags="-X ..."`. |
|
pkg
|
|
|
auth0mock
Package auth0mock is the Go SDK for the auth0-mock control plane.
|
Package auth0mock is the Go SDK for the auth0-mock control plane. |
|
auth0mock/auth0mocktest
Package auth0mocktest provides testing.TB-aware helpers for the pkg/auth0mock SDK.
|
Package auth0mocktest provides testing.TB-aware helpers for the pkg/auth0mock SDK. |
Click to show internal directories.
Click to hide internal directories.