pub enum AuthMethod {
Password {
username: String,
password: String,
},
Key {
username: String,
key: String,
},
Token {
username: String,
token: String,
},
}Expand description
Authentication method used by the cPanel / WHM client.
Password— Standard Basic auth. Works for both cPanel UAPI and WHM JSON API.Key— WHM raw access key auth (WHM user:key). Requires a raw key generated in WHM > Manage Remote Access Key.Token— cPanel API Token auth (Authorization: cpanel <user>:<token>). Grants granular, scoped permissions without requiring a full account password or root access. Generate tokens in cPanel > Home > Security Center > API Tokens.
Variants§
Password
Password-based authentication.
Key
WHM raw key authentication.
Fields
Token
cPanel API Token authentication.
Trait Implementations§
Source§impl Clone for AuthMethod
impl Clone for AuthMethod
Auto Trait Implementations§
impl Freeze for AuthMethod
impl RefUnwindSafe for AuthMethod
impl Send for AuthMethod
impl Sync for AuthMethod
impl Unpin for AuthMethod
impl UnsafeUnpin for AuthMethod
impl UnwindSafe for AuthMethod
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