From 0c45d5140650357a6816bb6f4fdc8c48c39d3daf Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 7 Aug 2023 11:16:36 +0200 Subject: [PATCH] login: add userid and api_url getters Signed-off-by: Wolfgang Bumiller --- proxmox-login/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/proxmox-login/src/lib.rs b/proxmox-login/src/lib.rs index f7059dea..65b875cd 100644 --- a/proxmox-login/src/lib.rs +++ b/proxmox-login/src/lib.rs @@ -78,6 +78,16 @@ impl Login { self.api_url = api_url.into(); } + /// Get the userid this request is for. + pub fn userid(&self) -> &str { + &self.userid + } + + /// Get the API url this request is for. + pub fn api_url(&self) -> &str { + &self.api_url + } + /// Prepare a request given an already parsed ticket. pub fn renew_ticket(api_url: impl Into, ticket: Ticket) -> Self { Self {