Skip to main content

windows_lsa/
stub.rs

1//! Non-Windows no-op back-end. Every entry point returns
2//! [`Error::Unsupported`] so callers can `cfg`-gate at their own convenience
3//! without breaking the shared type signature.
4
5use crate::{AuthPackageId, Error, KrbCred, Luid, Result, TicketCacheInfo};
6
7#[derive(Debug)]
8pub struct Lsa;
9
10#[derive(Debug)]
11pub struct LsaHandle {
12    _private: (),
13}
14
15impl Lsa {
16    pub fn connect_untrusted() -> Result<LsaHandle> {
17        Err(Error::Unsupported)
18    }
19}
20
21impl LsaHandle {
22    pub fn kerberos_package(&self) -> Result<AuthPackageId> {
23        Err(Error::Unsupported)
24    }
25
26    pub fn retrieve_tgt(&self, _pkg: AuthPackageId, _luid: Option<Luid>) -> Result<KrbCred> {
27        Err(Error::Unsupported)
28    }
29
30    pub fn query_ticket_cache(
31        &self,
32        _pkg: AuthPackageId,
33        _luid: Option<Luid>,
34    ) -> Result<Vec<TicketCacheInfo>> {
35        Err(Error::Unsupported)
36    }
37
38    pub fn submit_ticket(
39        &self,
40        _pkg: AuthPackageId,
41        _cred: &KrbCred,
42        _luid: Option<Luid>,
43    ) -> Result<()> {
44        Err(Error::Unsupported)
45    }
46
47    pub fn purge_ticket_cache(
48        &self,
49        _pkg: AuthPackageId,
50        _luid: Option<Luid>,
51        _target_spn: Option<&str>,
52    ) -> Result<()> {
53        Err(Error::Unsupported)
54    }
55}