Skip to main content

ScopeResolver

Trait ScopeResolver 

Source
pub trait ScopeResolver: Send + Sync {
    // Required method
    fn resolve<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 dyn ToolContext,
    ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Resolves the set of scopes granted to the current user.

Implementations can pull scopes from session state, JWT claims, an external identity provider, or any other source.

Required Methods§

Source

fn resolve<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 dyn ToolContext, ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the scopes granted to the user in the given tool context.

Implementors§