Skip to main content

AuthPrincipal

Trait AuthPrincipal 

Source
pub trait AuthPrincipal: Send + Sync {
    // Required methods
    fn principal(&self) -> &Principal;
    fn provider_id(&self) -> &str;
}
Expand description

Read-only view of the principal minted by the authentication path.

camel-api must never name a camel-auth type (no dependency cycle), so the concrete AuthenticatedPrincipal lives in camel-auth and this crate consumes it through this trait.

Required Methods§

Source

fn principal(&self) -> &Principal

The authenticated principal.

Source

fn provider_id(&self) -> &str

The identifier of the provider that minted this principal.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§