Skip to main content

Crate p47h_engine

Crate p47h_engine 

Source
Expand description

§p47h-engine

Core engine for P47H with cryptographic identity management and local policy evaluation.

This crate provides a complete AuthN/AuthZ solution for web applications. It is designed to be used as a library (rlib) by WASM wrappers.

Re-exports§

pub use vault::VaultCrypto;

Modules§

vault
Vault cryptographic operations (encryption/decryption) Vault cryptographic operations.

Structs§

AuthDecision
Authorization decision result
AuthDecisionWithProof
Authorization decision with metadata (simplified - no cryptographic proofs in open-core)
P47hClient
WASM-compatible client managing Identity lifecycle and local policy evaluation.
PolicyDiagnostic
Policy validation diagnostic result
WasmIdentity
WASM wrapper for Identity
WasmPolicy
WASM wrapper for Policy

Functions§

init_engine
Initialize the engine (sets panic hook for debugging). This should be called by the WASM wrapper, not directly.
parse_resource
Helper function to parse resource string into Resource enum
set_panic_hook
Set the console.error panic hook the first time this is called. Subsequent invocations do nothing.
validate_policy
Validates a policy TOML string
validate_policy_detailed
Validates a policy TOML string with precise error reporting