pub struct OidcErrorManager { /* private fields */ }Expand description
Error handling manager for OpenID Connect
Implementations§
Source§impl OidcErrorManager
impl OidcErrorManager
Sourcepub fn create_unmet_auth_requirements_error(
&self,
requirements: AuthenticationRequirements,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_unmet_auth_requirements_error( &self, requirements: AuthenticationRequirements, state: Option<String>, ) -> OidcErrorResponse
Create error response for unmet authentication requirements
Sourcepub fn create_insufficient_acr_error(
&self,
required_acr: Vec<String>,
achieved_acr: Option<String>,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_insufficient_acr_error( &self, required_acr: Vec<String>, achieved_acr: Option<String>, state: Option<String>, ) -> OidcErrorResponse
Create error response for insufficient ACR
Sourcepub fn create_error_response(
&self,
error_code: OidcErrorCode,
custom_description: Option<String>,
state: Option<String>,
additional_details: HashMap<String, Value>,
) -> OidcErrorResponse
pub fn create_error_response( &self, error_code: OidcErrorCode, custom_description: Option<String>, state: Option<String>, additional_details: HashMap<String, Value>, ) -> OidcErrorResponse
Create generic error response
Sourcepub fn add_custom_error_mapping(
&mut self,
identifier: String,
error_code: OidcErrorCode,
)
pub fn add_custom_error_mapping( &mut self, identifier: String, error_code: OidcErrorCode, )
Add custom error mapping
Sourcepub fn remove_custom_error_mapping(
&mut self,
identifier: &str,
) -> Option<OidcErrorCode>
pub fn remove_custom_error_mapping( &mut self, identifier: &str, ) -> Option<OidcErrorCode>
Remove custom error mapping
Sourcepub fn resolve_error_code(&self, identifier: &str) -> Option<OidcErrorCode>
pub fn resolve_error_code(&self, identifier: &str) -> Option<OidcErrorCode>
Get error code from string identifier (checks custom mappings first, then standard codes)
Sourcepub fn create_error_response_from_identifier(
&self,
error_identifier: &str,
custom_description: Option<String>,
state: Option<String>,
additional_details: HashMap<String, Value>,
) -> Result<OidcErrorResponse>
pub fn create_error_response_from_identifier( &self, error_identifier: &str, custom_description: Option<String>, state: Option<String>, additional_details: HashMap<String, Value>, ) -> Result<OidcErrorResponse>
Create error response from string identifier
Sourcepub fn get_custom_mappings(&self) -> &HashMap<String, OidcErrorCode>
pub fn get_custom_mappings(&self) -> &HashMap<String, OidcErrorCode>
Get all custom error mappings
Sourcepub fn clear_custom_mappings(&mut self)
pub fn clear_custom_mappings(&mut self)
Clear all custom error mappings
Sourcepub fn has_custom_mapping(&self, identifier: &str) -> bool
pub fn has_custom_mapping(&self, identifier: &str) -> bool
Check if custom mapping exists
Trait Implementations§
Source§impl Clone for OidcErrorManager
impl Clone for OidcErrorManager
Source§fn clone(&self) -> OidcErrorManager
fn clone(&self) -> OidcErrorManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OidcErrorManager
impl Debug for OidcErrorManager
Auto Trait Implementations§
impl Freeze for OidcErrorManager
impl RefUnwindSafe for OidcErrorManager
impl Send for OidcErrorManager
impl Sync for OidcErrorManager
impl Unpin for OidcErrorManager
impl UnwindSafe for OidcErrorManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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