pub struct AuthenticationMiddleware { /* private fields */ }Expand description
Authentication middleware
Implementations§
Source§impl AuthenticationMiddleware
impl AuthenticationMiddleware
Sourcepub fn new(config: AuthenticationConfig) -> Self
pub fn new(config: AuthenticationConfig) -> Self
Create new authentication middleware
Sourcepub fn add_provider(&mut self, provider: Box<dyn AuthenticationProvider>)
pub fn add_provider(&mut self, provider: Box<dyn AuthenticationProvider>)
Add authentication provider
Sourcepub fn authenticate(
&self,
credentials: &AuthenticationCredentials,
) -> SklResult<UserInfo>
pub fn authenticate( &self, credentials: &AuthenticationCredentials, ) -> SklResult<UserInfo>
Authenticate request
Trait Implementations§
Source§impl PipelineMiddleware for AuthenticationMiddleware
impl PipelineMiddleware for AuthenticationMiddleware
Source§fn before_process(
&self,
context: &mut MiddlewareContext,
_input: &Array2<Float>,
) -> SklResult<()>
fn before_process( &self, context: &mut MiddlewareContext, _input: &Array2<Float>, ) -> SklResult<()>
Execute before pipeline processing
Source§fn after_process(
&self,
_context: &mut MiddlewareContext,
_output: &Array2<Float>,
) -> SklResult<()>
fn after_process( &self, _context: &mut MiddlewareContext, _output: &Array2<Float>, ) -> SklResult<()>
Execute after pipeline processing
Source§fn on_error(
&self,
_context: &mut MiddlewareContext,
_error: &SklearsError,
) -> SklResult<ErrorAction>
fn on_error( &self, _context: &mut MiddlewareContext, _error: &SklearsError, ) -> SklResult<ErrorAction>
Handle errors during pipeline execution
Source§fn should_execute(&self, context: &MiddlewareContext) -> bool
fn should_execute(&self, context: &MiddlewareContext) -> bool
Whether middleware should be executed
Auto Trait Implementations§
impl Freeze for AuthenticationMiddleware
impl !RefUnwindSafe for AuthenticationMiddleware
impl Send for AuthenticationMiddleware
impl Sync for AuthenticationMiddleware
impl Unpin for AuthenticationMiddleware
impl !UnwindSafe for AuthenticationMiddleware
Blanket Implementations§
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
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