wasmcloud_runtime/component/
identity.rs
use async_trait::async_trait;
use tracing::instrument;
use crate::capability::identity::{self, store};
use super::{Ctx, Handler};
#[async_trait]
pub trait Identity {
async fn get(
&self,
audience: &str,
) -> anyhow::Result<Result<Option<String>, identity::store::Error>>;
}
#[async_trait]
impl<H: Handler> store::Host for Ctx<H> {
#[instrument(skip(self))]
async fn get(
&mut self,
audience: String,
) -> anyhow::Result<Result<Option<String>, identity::store::Error>> {
self.attach_parent_context();
Identity::get(&self.handler, &audience).await
}
}