pub struct ComdirectConfig {
pub user: String,
pub password: String,
pub client_id: String,
pub client_secret: String,
pub on_refresh_token: Option<Arc<dyn Fn(String) + Send + Sync>>,
pub on_awaits_user_confirm: Arc<dyn Fn() -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>,
}Expand description
Configuration required to authenticate with the Comdirect REST API.
Fields§
§user: StringThe username or zugangsnummer.
password: StringThe password or PIN.
client_id: StringThe OAuth2 Client ID provided by Comdirect.
client_secret: StringThe OAuth2 Client Secret provided by Comdirect.
on_refresh_token: Option<Arc<dyn Fn(String) + Send + Sync>>Optional callback invoked whenever a new refresh token is obtained. This allows the consumer to persist the token for future sessions.
on_awaits_user_confirm: Arc<dyn Fn() -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>Async callback invoked when a Push-TAN challenge is triggered. The session creation will wait for this callback to complete before starting its internal timer.
Trait Implementations§
Source§impl Clone for ComdirectConfig
impl Clone for ComdirectConfig
Source§fn clone(&self) -> ComdirectConfig
fn clone(&self) -> ComdirectConfig
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 moreAuto Trait Implementations§
impl Freeze for ComdirectConfig
impl !RefUnwindSafe for ComdirectConfig
impl Send for ComdirectConfig
impl Sync for ComdirectConfig
impl Unpin for ComdirectConfig
impl UnsafeUnpin for ComdirectConfig
impl !UnwindSafe for ComdirectConfig
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