OpenAgentID documentation
Source referencesRust module referenceaegis-delegate

aegis-delegate · session_key

Declared module signatures, types, configuration, and source documentation.

Source: aegis/aegis-delegate/src/session_key.rs. SHA-256: 76d7efb78b87181ecc07a35c09843cc3cea1e89c94cc505e4c1ad73237f60753.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

session_key::create_session_key

Creates a session key (temporary, scoped, max 24h).

Generates a fresh Ed25519 keypair for the session. The public key is encoded as multibase (base64url) and stored in the [SessionKey] struct. The session key grant is signed by the principal's identity key.

Errors

Returns [DelegationError] if:

  • The requested lifetime exceeds 24 hours
  • JCS canonicalization fails

Returns

A tuple of (SessionKey, SigningKey) where the SigningKey is the ephemeral private key for the session.

pub fn create_session_key(
    principal_did: &str,
    scope: DelegationScope,
    max_transactions: Option<u64>,
    lifetime: Duration,
    principal_signing_key: &SigningKey,
    verification_method: &str,
) -> Result<(SessionKey, SigningKey), DelegationError>;

Source line: 54.

On this page