Skip to main content

comdirect_rest_api/
auth.rs

1use serde_json::Value;
2
3/// A single interactive authentication challenge emitted by comdirect.
4#[derive(Debug, Clone)]
5pub struct LoginChallenge {
6    pub challenge_id: String,
7    pub session_id: String,
8    pub payload: Value,
9}
10
11/// User decision for a pending TAN challenge.
12#[derive(Debug, Clone)]
13pub enum TanAction {
14    /// Confirm a Push-TAN challenge after the user has already approved it externally.
15    ConfirmPushTan,
16    /// Switch to a different TAN method and submit its TAN value.
17    SwitchTanMethod { method_id: String, tan: String },
18    /// Abort the login flow.
19    Cancel,
20}