async_nats/
auth.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{options::CallbackArg1, AuthError};

#[derive(Default)]
pub struct Auth {
    pub jwt: Option<String>,
    pub nkey: Option<String>,
    pub(crate) signature_callback: Option<CallbackArg1<String, Result<String, AuthError>>>,
    pub signature: Option<Vec<u8>>,
    pub username: Option<String>,
    pub password: Option<String>,
    pub token: Option<String>,
}

impl Auth {
    pub fn new() -> Auth {
        Auth::default()
    }
}