Skip to main content

resolve_write_audience

Function resolve_write_audience 

Source
pub fn resolve_write_audience(
    ctx: Option<&Extension<AuthContext>>,
    default_audience: &WriteAudience,
) -> WriteAudience
Expand description

Resolves the write audience for one request: a credential carrying a bound audience gets stamped with it (or, if that label fails WriteAudience::new validation, with default_audience instead, warn!-logged); one without a bound audience – or with no auth provider at all, ctx: None – resolves straight to default_audience. The result is always a real audience: there is no unstamped state left to resolve to.