pub trait IdentityResolver: Send + Sync + Debug {
    // Required method
    fn resolve_identity(&self, config_bag: &ConfigBag) -> Future<Identity>;
}
Expand description

Resolver for identities.

Every AuthScheme has one or more compatible identity resolvers, which are selected from runtime components by the auth scheme implementation itself.

The identity resolver must return a Future with the resolved identity, or an error if resolution failed. There is no optionality for identity resolvers. The identity either resolves successfully, or it fails. The orchestrator will choose exactly one auth scheme to use, and thus, its chosen identity resolver is the only identity resolver that runs. There is no fallback to other auth schemes in the absense of an identity.

Required Methods§

source

fn resolve_identity(&self, config_bag: &ConfigBag) -> Future<Identity>

Asynchronously resolves an identity for a request using the given config.

Implementors§