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 pro Daemon (CLI --auth-mode <MODE>).
Variants§
None
Keine Auth. Subject = “anonymous”.
Bearer
Bearer-Token-Vergleich (HTTP-Header Authorization: Bearer …).
Multi-Token via Map token → subject.
Fields
§
tokens: HashMap<String, AuthSubject>Mapping vom Token-String auf das resultierende Subject.
Jwt
JWT — RS256-Signature-Validation gegen RSA-Public-Key (DER-Bytes
wie aus RsaPublicKey::to_pkcs1_der).
Fields
Mtls
mTLS — Identity wird vom TLS-Layer (Client-Cert) geliefert,
nicht von dieser Funktion. AuthMode::validate mit Mtls
erwartet presented_subject = Some(...).
SaslPlain
SASL-PLAIN — username\0username\0password-Frame, mit 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