pub enum AuthMode {
None,
Bearer {
tokens: HashMap<String, AuthSubject>,
},
Jwt {
pkcs1_pubkey_der: Vec<u8>,
expected_issuer: Option<String>,
},
Mtls,
SaslPlain {
users: HashMap<String, String>,
},
}Expand description
Auth mode per daemon (CLI --auth-mode <MODE>).
Variants§
None
No auth. Subject = “anonymous”.
Bearer
Bearer token comparison (HTTP header Authorization: Bearer …).
Multi-token via map token → subject.
Fields
§
tokens: HashMap<String, AuthSubject>Mapping from the token string to the resulting subject.
Jwt
JWT — RS256 signature validation against an RSA public key (DER
bytes as from RsaPublicKey::to_pkcs1_der).
Fields
Mtls
mTLS — identity is supplied by the TLS layer (client cert), not
by this function. AuthMode::validate with Mtls expects
presented_subject = Some(...).
SaslPlain
SASL-PLAIN — username\0username\0password frame, with map
username → password.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthMode
impl RefUnwindSafe for AuthMode
impl Send for AuthMode
impl Sync for AuthMode
impl Unpin for AuthMode
impl UnsafeUnpin for AuthMode
impl UnwindSafe for AuthMode
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