ic_auth_types
IC-Auth is a web authentication system based on the Internet Computer.
ic_auth_types provides the shared Rust data model for IC-Auth: delegation records, compact wire forms, Base64URL byte wrappers, XID identifiers, and CBOR helpers used by signers and verifiers.
Features
Delegation,SignedDelegation,SignInResponse, and compactp/e/twire forms.ByteBufB64,ByteArrayB64, andBytesB64for binary fields that become Base64URL strings in JSON and byte strings in CBOR.Xid, a compact 12-byte, lexicographically sortable identifier with optional interoperability with thexidcrate.CandidTypeand Serde support for IC canister interfaces, JSON APIs, and CBOR payloads.cbor_into_vec,cbor_from_slice, and deterministic RFC 8949 CBOR helpers for signed or hashed payloads.
Installation
Add this to your Cargo.toml:
[]
= "0.9"
Enable interoperability with the original xid crate:
[]
= { = "0.9", = ["xid"] }
Example
use Principal;
use ;
Feature Flags
default: no optional dependencies.xid: enables conversion to and fromxid::Id.full: currently aliasesxid.
Related Crates
ic_auth_verifier: signature, envelope, delegation-chain, and deep-link verification utilities.
License
Copyright © 2024-2026 LDC Labs.
ldclabs/ic-auth is licensed under the MIT License. See LICENSE for the full license text.