Skip to main content

Auth

Trait Auth 

Source
pub trait Auth:
    Send
    + Sync
    + 'static {
    // Required method
    fn resolve(&self, token: &str) -> Option<String>;
}
Expand description

Resolves bearer tokens to Verifiable Identifiers.

Implementations are consulted on every inbound request before the framework’s TransportHandler sees the document. Returning None means the request is unauthenticated; the server may still accept it (the framework falls back to in-band issuer + proof), or apply policy (e.g. require auth for non-bearer specs).

Required Methods§

Source

fn resolve(&self, token: &str) -> Option<String>

Resolve token to a VID, or return None if the token is unknown.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§