schemas

package
v0.0.0-...-a66a6b2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 25 Imported by: 3

Documentation

Overview

Package schemas locates and validates the versioned schema documents kept in the repository's document-only versions directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowserAuthenticationCallSupplementSchema

func BrowserAuthenticationCallSupplementSchema(profile string) ([]byte, error)

BrowserAuthenticationCallSupplementSchema returns an independent copy of the embedded browser-authentication-call JSON Schema selected by profile. An empty profile selects uws.browser-authentication-call.1.1.

func BrowserAuthenticationProfileSchema

func BrowserAuthenticationProfileSchema(profile string) ([]byte, error)

BrowserAuthenticationProfileSchema returns an independent copy of the embedded browser-authentication JSON Schema selected by profile. An empty profile selects uws.browser-authentication.1.1.

func BrowserRegistrationCallSupplementSchema

func BrowserRegistrationCallSupplementSchema(profile string) ([]byte, error)

BrowserRegistrationCallSupplementSchema returns an independent copy of the embedded browser-registration-call JSON Schema. An empty profile selects uws.browser-registration-call.1.0.

func BrowserRegistrationInputSchema

func BrowserRegistrationInputSchema(version string) ([]byte, error)

BrowserRegistrationInputSchema returns independent bytes of the selected private-envelope schema. Empty version selects 1.0.

func BrowserRegistrationInputTemplate

func BrowserRegistrationInputTemplate(profile []byte, flow string) ([]byte, error)

BrowserRegistrationInputTemplate creates an unfilled private JSON draft for one registration type. Null means unfilled; it never means consent or false. Callers own private file permissions and must never package filled instances.

func BrowserRegistrationProfileSchema

func BrowserRegistrationProfileSchema(profile string) ([]byte, error)

BrowserRegistrationProfileSchema returns an independent copy of the embedded browser-registration JSON Schema. An empty profile selects uws.browser-registration.1.0.

func BrowserSourceProfileSchema

func BrowserSourceProfileSchema(profile string) ([]byte, error)

BrowserSourceProfileSchema returns an independent copy of the embedded browser-profile JSON Schema selected by profile. An empty profile retains the uws.browser.1.8 compatibility default; browser 1.10 and its predecessors are opt-in.

func MockFixturesSchema

func MockFixturesSchema() ([]byte, error)

MockFixturesSchema returns an independent copy of the embedded mock fixture format 1.0 JSON Schema.

func PathForBrowserAuthenticationCallSupplement

func PathForBrowserAuthenticationCallSupplement(anchorDir, profile string) string

PathForBrowserAuthenticationCallSupplement returns the best local schema path for the browser-authentication-call operation supplement.

func PathForBrowserAuthenticationProfile

func PathForBrowserAuthenticationProfile(anchorDir, profile string) string

PathForBrowserAuthenticationProfile returns the best local schema path for a portable browser-authentication recipe.

func PathForBrowserRegistrationCallSupplement

func PathForBrowserRegistrationCallSupplement(anchorDir, profile string) string

PathForBrowserRegistrationCallSupplement returns the best local schema path for the browser-registration-call operation supplement.

func PathForBrowserRegistrationInput

func PathForBrowserRegistrationInput(anchorDir, version string) string

PathForBrowserRegistrationInput returns the best local private-envelope schema path. The schema is portable; filled instances are always private.

func PathForBrowserRegistrationProfile

func PathForBrowserRegistrationProfile(anchorDir, profile string) string

PathForBrowserRegistrationProfile returns the best local schema path for a portable browser account-registration recipe.

func PathForBrowserSourceProfile

func PathForBrowserSourceProfile(anchorDir, profile string) string

PathForBrowserSourceProfile returns the best local schema path for a browser source profile. An empty profile retains the browser 1.8 compatibility default; browser 1.10 and its predecessors are selected explicitly.

func PathForMockFixtures

func PathForMockFixtures(anchorDir string) string

PathForMockFixtures returns the best local schema path for mock fixture format 1.0.

func PathForRuntimeSupplement

func PathForRuntimeSupplement(anchorDir, profile string) string

PathForRuntimeSupplement returns the best local schema path for a runtime supplement profile.

func PathForVersion

func PathForVersion(anchorDir, version string) string

PathForVersion returns the local schema path named by the exact UWS version. Unpublished stable and pre-release versions do not silently fall back to a different published schema; callers must provide the matching schema file.

func ValidateBrowserAuthenticationCallSupplement

func ValidateBrowserAuthenticationCallSupplement(data []byte) error

ValidateBrowserAuthenticationCallSupplement validates the extension payload envelope used by an explicit authentication operation.

func ValidateBrowserAuthenticationCallSupplementForProfile

func ValidateBrowserAuthenticationCallSupplementForProfile(data []byte, profile string) error

ValidateBrowserAuthenticationCallSupplementForProfile validates the call envelope against the explicitly selected supplement version. Call envelopes have no document discriminator, so version selection cannot be inferred.

func ValidateBrowserAuthenticationProfile

func ValidateBrowserAuthenticationProfile(data []byte) error

ValidateBrowserAuthenticationProfile validates one portable, secret-free browser authentication recipe. In addition to JSON Schema validation it enforces exact safe origins and the 1 MiB document bound.

func ValidateBrowserRegistrationCallBinding

func ValidateBrowserRegistrationCallBinding(profile, call []byte) error

ValidateBrowserRegistrationCallBinding checks a 1.1 call against the actual selected profile, including flow existence and exact credential-slot keys. Resolving inputBinding and binding private values remain runtime operations.

func ValidateBrowserRegistrationCallBindingForProfile

func ValidateBrowserRegistrationCallBindingForProfile(profile, call []byte, callProfile string) error

ValidateBrowserRegistrationCallBindingForProfile requires an explicit call version and the matching actual profile; the default API remains 1.1.

func ValidateBrowserRegistrationCallSupplement

func ValidateBrowserRegistrationCallSupplement(data []byte) error

ValidateBrowserRegistrationCallSupplement validates the extension envelope used by one explicitly approved registration mutation.

func ValidateBrowserRegistrationCallSupplementForProfile

func ValidateBrowserRegistrationCallSupplementForProfile(data []byte, profile string) error

ValidateBrowserRegistrationCallSupplementForProfile validates an explicitly selected supplement. The unversioned API retains its original 1.0 meaning.

func ValidateBrowserRegistrationInputUpdate

func ValidateBrowserRegistrationInputUpdate(profile, current, previous []byte, flow, checkpoint string) error

ValidateBrowserRegistrationInputUpdate checks a private snapshot before one declared checkpoint. Previous is nil only at the first checkpoint. Otherwise supply the last accepted snapshot, never another unaccepted draft. Errors intentionally omit input values, keys and nested parser/schema diagnostics. The runtime separately enforces checkpoint order, activation, expiry, atomic reads, identity/attempt history, immutable submission and private storage.

func ValidateBrowserRegistrationProfile

func ValidateBrowserRegistrationProfile(data []byte) error

ValidateBrowserRegistrationProfile validates one portable, secret-free account-registration recipe. It enforces exact safe origins, symbolic slot references, exactly one account-creation submit, explicit confirmation, and consistency between human checkpoints and declared effects.

func ValidateBrowserSourceProfile

func ValidateBrowserSourceProfile(data []byte) error

ValidateBrowserSourceProfile validates one JSON or YAML browser-profile document against the embedded schema selected by its profile discriminator. Freshness, review evidence, registry lifecycle, sessions, and execution policy remain downstream responsibilities.

func ValidateMockFixtures

func ValidateMockFixtures(data []byte) error

ValidateMockFixtures validates one strict JSON fixture document against the exact embedded mock fixture 1.0 schema. The document size is bounded because fixture packs may contain caller-supplied response values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL