pub struct ConfiguredScimPlugin<S: AuthSchema> { /* private fields */ }Expand description
A SCIM plugin carrying application-owned transactional projection callbacks.
Implementations§
Source§impl<S: AuthSchema> ConfiguredScimPlugin<S>
impl<S: AuthSchema> ConfiguredScimPlugin<S>
pub fn authentication( self, verifier: Arc<dyn ScimBearerTokenVerifier<S>>, ) -> Self
pub fn identity(self, identity: Arc<dyn ScimIdentity<S>>) -> Self
pub fn roles(self, roles: Arc<dyn ScimRoleProjection<S>>) -> Self
Trait Implementations§
Source§impl<S: AuthSchema> AuthPlugin<S> for ConfiguredScimPlugin<S>
impl<S: AuthSchema> AuthPlugin<S> for ConfiguredScimPlugin<S>
Source§fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
Base declarations for documentation without an initialized auth instance.
Source§fn openapi_metadata(&self, ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
fn openapi_metadata(&self, ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
Documentation annotations collected after all plugins initialize.
Override this hook for custom endpoints and model field policies.
Source§fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
Media types accepted before request hooks and endpoint dispatch. An empty
list disables the media restriction for an application-owned endpoint.
Source§fn server_endpoints(&self) -> Vec<EndpointDefinition>
fn server_endpoints(&self) -> Vec<EndpointDefinition>
Trusted operations available through host dispatch, independently of HTTP visibility.
Source§fn validate_endpoint(
&self,
call: &EndpointCall,
ctx: &AuthContext<S>,
) -> AuthResult<EndpointInput>
fn validate_endpoint( &self, call: &EndpointCall, ctx: &AuthContext<S>, ) -> AuthResult<EndpointInput>
Validate actual input after all before-hook patches have been applied. Read more
Source§fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called when the plugin is initialized
Source§fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Execute a registered operation with validated handler-phase context. Read more
Source§fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<HttpRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<HttpRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Inspect or replace the physical request. The default preserves existing
on_http_request implementations. Request-local configuration has already
been resolved from the incoming request, matching the Source HTTP handler.Source§fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called for each request - return Some(response) to handle, None to pass through
Source§fn rate_limits(&self) -> Vec<PluginRateLimit>
fn rate_limits(&self) -> Vec<PluginRateLimit>
Ordered rate-limit policies supplied by this installed plugin.
Source§fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
Installed logical-call hooks, in this plugin’s registration order.
Source§fn origin_check_skip_paths(&self) -> Vec<&'static str>
fn origin_check_skip_paths(&self) -> Vec<&'static str>
Protocol callback prefixes whose verified state replaces browser origin admission.
Source§fn session_fields(&self) -> IndexMap<String, FieldConfig>
fn session_fields(&self) -> IndexMap<String, FieldConfig>
Session field policies contributed by this registered plugin.
fn user_fields(&self) -> IndexMap<String, FieldConfig>
fn account_fields(&self) -> IndexMap<String, FieldConfig>
Source§fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Inspect the original physical HTTP request before routing, body parsing,
origin validation and endpoint hooks. Disabled paths and transport/rate
limiting middleware run first. Returning a response stops dispatch and
later plugin hooks. Server-only endpoint calls do not invoke this hook.
Source§fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Observe the routed HTTP response before transport middleware (including CORS).
Hooks run in registration order; the first replacement stops this chain.
Early HTTP request-hook responses skip this stage. Errors escape dispatch;
they cannot reverse writes already committed by an endpoint.
Source§fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<BeforeRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<BeforeRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called after route matching and before endpoint dispatch. Read more
Source§fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Dispatch the resolved HTTP endpoint. Existing plugins return logical
values through
on_request; plugins returning a native raw response can
override this method to bypass the endpoint after-hook pipeline.Source§fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<AuthResponse, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Transform a completed response, including redirects and rejections. Read more
Source§fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called after a user is created
Source§fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called after a session is created
Source§fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called before a user is deleted
Source§fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Called before a session is deleted
Auto Trait Implementations§
impl<S> !RefUnwindSafe for ConfiguredScimPlugin<S>
impl<S> !UnwindSafe for ConfiguredScimPlugin<S>
impl<S> Freeze for ConfiguredScimPlugin<S>where
Option<Arc<dyn ScimProjection<S>>>: Freeze,
Option<Arc<dyn ScimIdentity<S>>>: Freeze,
Option<Arc<dyn ScimRoleProjection<S>>>: Freeze,
Option<Arc<dyn ScimBearerTokenVerifier<S>>>: Freeze,
impl<S> Send for ConfiguredScimPlugin<S>where
Option<Arc<dyn ScimProjection<S>>>: Send,
Option<Arc<dyn ScimIdentity<S>>>: Send,
Option<Arc<dyn ScimRoleProjection<S>>>: Send,
Option<Arc<dyn ScimBearerTokenVerifier<S>>>: Send,
impl<S> Sync for ConfiguredScimPlugin<S>where
Option<Arc<dyn ScimProjection<S>>>: Sync,
Option<Arc<dyn ScimIdentity<S>>>: Sync,
Option<Arc<dyn ScimRoleProjection<S>>>: Sync,
Option<Arc<dyn ScimBearerTokenVerifier<S>>>: Sync,
impl<S> Unpin for ConfiguredScimPlugin<S>where
Option<Arc<dyn ScimProjection<S>>>: Unpin,
Option<Arc<dyn ScimIdentity<S>>>: Unpin,
Option<Arc<dyn ScimRoleProjection<S>>>: Unpin,
Option<Arc<dyn ScimBearerTokenVerifier<S>>>: Unpin,
impl<S> UnsafeUnpin for ConfiguredScimPlugin<S>where
Option<Arc<dyn ScimProjection<S>>>: UnsafeUnpin,
Option<Arc<dyn ScimIdentity<S>>>: UnsafeUnpin,
Option<Arc<dyn ScimRoleProjection<S>>>: UnsafeUnpin,
Option<Arc<dyn ScimBearerTokenVerifier<S>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more