pub struct EnhancedCibaManager { /* private fields */ }Expand description
Enhanced CIBA manager
Implementations§
Source§impl EnhancedCibaManager
impl EnhancedCibaManager
Sourcepub fn new(config: EnhancedCibaConfig) -> Self
pub fn new(config: EnhancedCibaConfig) -> Self
Create new Enhanced CIBA manager
Sourcepub fn new_with_session_manager(
config: EnhancedCibaConfig,
session_manager: Arc<SessionManager>,
) -> Self
pub fn new_with_session_manager( config: EnhancedCibaConfig, session_manager: Arc<SessionManager>, ) -> Self
Create new Enhanced CIBA manager with custom session manager
Sourcepub fn configure_keys(
&mut self,
encoding_key: EncodingKey,
decoding_key: DecodingKey,
)
pub fn configure_keys( &mut self, encoding_key: EncodingKey, decoding_key: DecodingKey, )
Configure JWT keys for token generation
Sourcepub async fn initiate_backchannel_auth(
&self,
params: BackchannelAuthParams<'_>,
) -> Result<EnhancedCibaAuthResponse>
pub async fn initiate_backchannel_auth( &self, params: BackchannelAuthParams<'_>, ) -> Result<EnhancedCibaAuthResponse>
Initiate backchannel authentication request
Sourcepub async fn poll_auth_request(
&self,
auth_req_id: &str,
) -> Result<CibaTokenResponse>
pub async fn poll_auth_request( &self, auth_req_id: &str, ) -> Result<CibaTokenResponse>
Poll authentication request status
Sourcepub async fn complete_auth_request(
&self,
auth_req_id: &str,
user_authenticated: bool,
session_id: Option<String>,
) -> Result<()>
pub async fn complete_auth_request( &self, auth_req_id: &str, user_authenticated: bool, session_id: Option<String>, ) -> Result<()>
Complete authentication request
Sourcepub async fn get_auth_request(
&self,
auth_req_id: &str,
) -> Result<EnhancedCibaAuthRequest>
pub async fn get_auth_request( &self, auth_req_id: &str, ) -> Result<EnhancedCibaAuthRequest>
Get authentication request by ID
Sourcepub async fn get_user_sessions(&self, subject: &str) -> Vec<String>
pub async fn get_user_sessions(&self, subject: &str) -> Vec<String>
Get active sessions for a subject using session manager
Sourcepub async fn revoke_ciba_session(&self, auth_req_id: &str) -> Result<()>
pub async fn revoke_ciba_session(&self, auth_req_id: &str) -> Result<()>
Revoke session associated with CIBA request
Sourcepub async fn cancel_auth_request(&self, auth_req_id: &str) -> Result<()>
pub async fn cancel_auth_request(&self, auth_req_id: &str) -> Result<()>
Cancel authentication request
Sourcepub async fn cleanup_expired_requests(&self) -> Result<usize>
pub async fn cleanup_expired_requests(&self) -> Result<usize>
Clean up expired requests
Sourcepub fn config(&self) -> &EnhancedCibaConfig
pub fn config(&self) -> &EnhancedCibaConfig
Get configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnhancedCibaManager
impl !RefUnwindSafe for EnhancedCibaManager
impl Send for EnhancedCibaManager
impl Sync for EnhancedCibaManager
impl Unpin for EnhancedCibaManager
impl !UnwindSafe for EnhancedCibaManager
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> 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