pub struct AdvancedAuthManager { /* private fields */ }Expand description
Advanced authentication manager
Implementations§
Source§impl AdvancedAuthManager
impl AdvancedAuthManager
Sourcepub fn new(config: AdvancedAuthConfig) -> Self
pub fn new(config: AdvancedAuthConfig) -> Self
Create a new advanced authentication manager
Sourcepub fn with_multi_tenant_config(self, config: MultiTenantConfig) -> Self
pub fn with_multi_tenant_config(self, config: MultiTenantConfig) -> Self
Configure multi-tenant authentication
Sourcepub fn with_oauth_refresh<F>(self, refresh_fn: F) -> Self
pub fn with_oauth_refresh<F>(self, refresh_fn: F) -> Self
Set OAuth token refresh function
Sourcepub async fn create_oauth_client(&self) -> Result<Client<OpenaiEnvironmentImpl>>
pub async fn create_oauth_client(&self) -> Result<Client<OpenaiEnvironmentImpl>>
Create or refresh OAuth client with token management
§Errors
Returns an error if token refresh fails, token is expired without refresh capability, or client creation fails.
Sourcepub async fn create_tenant_client(
&self,
tenant_id: &str,
) -> Result<Client<OpenaiEnvironmentImpl>>
pub async fn create_tenant_client( &self, tenant_id: &str, ) -> Result<Client<OpenaiEnvironmentImpl>>
Create tenant-specific client
§Errors
Returns an error if multi-tenant configuration is not enabled, tenant isolation verification fails, tenant has no configured API key, or client creation fails.
Sourcepub async fn create_failover_client(
&self,
) -> Result<Client<OpenaiEnvironmentImpl>>
pub async fn create_failover_client( &self, ) -> Result<Client<OpenaiEnvironmentImpl>>
Create client with authentication failover
§Errors
Returns an error if both primary and secondary authentication attempts fail, or if no secondary key is available and primary authentication fails.
Sourcepub async fn create_session_client(
&self,
session_id: &str,
) -> Result<Client<OpenaiEnvironmentImpl>>
pub async fn create_session_client( &self, session_id: &str, ) -> Result<Client<OpenaiEnvironmentImpl>>
Sourcepub async fn cleanup_expired_sessions(&self) -> usize
pub async fn cleanup_expired_sessions(&self) -> usize
Sourcepub async fn get_performance_metrics(&self) -> AuthPerformanceMetrics
pub async fn get_performance_metrics(&self) -> AuthPerformanceMetrics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdvancedAuthManager
impl !RefUnwindSafe for AdvancedAuthManager
impl Send for AdvancedAuthManager
impl Sync for AdvancedAuthManager
impl Unpin for AdvancedAuthManager
impl !UnwindSafe for AdvancedAuthManager
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
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Entry is defined by the Collection trait.