Skip to main content

CredentialsStore

Trait CredentialsStore 

Source
pub trait CredentialsStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get(&self, session: &SessionId, scheme: &str) -> Option<String>;
    fn set(&self, session: SessionId, scheme: &str, credential: String);
    fn remove(&self, session: &SessionId, scheme: &str);
}
Expand description

Persistent storage for auth credentials, keyed by session + scheme.

Schemes follow the A2A / HTTP convention: "bearer", "basic", "api-key", etc. The stored value is the raw credential (e.g. the raw token string, not including the scheme prefix).

Required Methods§

Source

fn get(&self, session: &SessionId, scheme: &str) -> Option<String>

Returns the credential for the given session and scheme, if present.

Source

fn set(&self, session: SessionId, scheme: &str, credential: String)

Stores a credential for the given session and scheme.

Source

fn remove(&self, session: &SessionId, scheme: &str)

Removes the credential for the given session and scheme.

Implementors§