pub struct RegistrationManager { /* private fields */ }Expand description
User registration manager
Implementations§
Source§impl RegistrationManager
impl RegistrationManager
Sourcepub fn new(config: RegistrationConfig) -> Self
pub fn new(config: RegistrationConfig) -> Self
Create new registration manager
Sourcepub fn with_error_manager(
config: RegistrationConfig,
error_manager: OidcErrorManager,
) -> Self
pub fn with_error_manager( config: RegistrationConfig, error_manager: OidcErrorManager, ) -> Self
Create new registration manager with custom error manager
Sourcepub fn create_registration_disabled_error(
&self,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_registration_disabled_error( &self, state: Option<String>, ) -> OidcErrorResponse
Create OIDC error response for registration not enabled
Sourcepub fn create_invalid_registration_request_error(
&self,
description: String,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_invalid_registration_request_error( &self, description: String, state: Option<String>, ) -> OidcErrorResponse
Create OIDC error response for invalid registration request
Sourcepub fn create_session_not_found_error(
&self,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_session_not_found_error( &self, state: Option<String>, ) -> OidcErrorResponse
Create OIDC error response for registration session not found
Sourcepub fn create_registration_incomplete_error(
&self,
missing_fields: Vec<String>,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_registration_incomplete_error( &self, missing_fields: Vec<String>, state: Option<String>, ) -> OidcErrorResponse
Create OIDC error response for missing required registration fields
Sourcepub fn create_session_expired_error(
&self,
state: Option<String>,
) -> OidcErrorResponse
pub fn create_session_expired_error( &self, state: Option<String>, ) -> OidcErrorResponse
Create OIDC error response for expired registration session
Sourcepub fn get_error_manager(&self) -> &OidcErrorManager
pub fn get_error_manager(&self) -> &OidcErrorManager
Get error manager reference for external usage
Sourcepub fn update_error_manager(&mut self, error_manager: OidcErrorManager)
pub fn update_error_manager(&mut self, error_manager: OidcErrorManager)
Update error manager configuration
Sourcepub fn is_registration_requested(&self, prompt: Option<&str>) -> bool
pub fn is_registration_requested(&self, prompt: Option<&str>) -> bool
Check if registration is requested via prompt=create
Sourcepub fn initiate_registration(
&mut self,
request: RegistrationRequest,
) -> Result<String>
pub fn initiate_registration( &mut self, request: RegistrationRequest, ) -> Result<String>
Initiate user registration process
Sourcepub fn update_registration_data(
&mut self,
registration_id: &str,
updates: HashMap<String, Value>,
) -> Result<()>
pub fn update_registration_data( &mut self, registration_id: &str, updates: HashMap<String, Value>, ) -> Result<()>
Update registration data
Sourcepub fn validate_registration_data(
&self,
registration_id: &str,
) -> Result<Vec<String>>
pub fn validate_registration_data( &self, registration_id: &str, ) -> Result<Vec<String>>
Validate registration data completeness
Sourcepub fn validate_registration_completeness(
&self,
registration_id: &str,
state: Option<String>,
) -> Result<()>
pub fn validate_registration_completeness( &self, registration_id: &str, state: Option<String>, ) -> Result<()>
Validate registration data and create error response if incomplete
Sourcepub fn complete_registration(
&mut self,
registration_id: &str,
) -> Result<RegistrationResponse>
pub fn complete_registration( &mut self, registration_id: &str, ) -> Result<RegistrationResponse>
Complete user registration and create user account
Sourcepub fn get_registration_data(
&self,
registration_id: &str,
) -> Option<&RegistrationData>
pub fn get_registration_data( &self, registration_id: &str, ) -> Option<&RegistrationData>
Get registration session data
Sourcepub fn generate_registration_form(
&self,
registration_id: &str,
) -> Result<String>
pub fn generate_registration_form( &self, registration_id: &str, ) -> Result<String>
Generate registration form HTML
Sourcepub fn cleanup_expired_sessions(&mut self) -> usize
pub fn cleanup_expired_sessions(&mut self) -> usize
Clean up expired registration sessions
Sourcepub fn get_discovery_metadata(&self) -> HashMap<String, Value>
pub fn get_discovery_metadata(&self) -> HashMap<String, Value>
Get registration discovery metadata
Trait Implementations§
Source§impl Clone for RegistrationManager
impl Clone for RegistrationManager
Source§fn clone(&self) -> RegistrationManager
fn clone(&self) -> RegistrationManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RegistrationManager
impl RefUnwindSafe for RegistrationManager
impl Send for RegistrationManager
impl Sync for RegistrationManager
impl Unpin for RegistrationManager
impl UnwindSafe for RegistrationManager
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
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>
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>
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