async_nats/auth.rs
1use crate::{options::CallbackArg1, AuthError};
2
3#[derive(Default)]
4pub struct Auth {
5 pub jwt: Option<String>,
6 pub nkey: Option<String>,
7 pub(crate) signature_callback: Option<CallbackArg1<String, Result<String, AuthError>>>,
8 pub signature: Option<Vec<u8>>,
9 pub username: Option<String>,
10 pub password: Option<String>,
11 pub token: Option<String>,
12}
13
14impl Auth {
15 pub fn new() -> Auth {
16 Auth::default()
17 }
18}