pub enum Credentials {
Header(String),
Pem {
certificate_base64: String,
private_key_base64: String,
},
PemPath {
certificate_path: String,
private_key_path: String,
},
}Expand description
Represents how to authenticate to the cluster. Roperator supports either using an Authorization header
or a public/private key pair. The Header value can support either username/password or token based
authentication.
Variants§
Header(String)
Represents the value to set for an Authorization header. This value must include the prefix (e.g. Basic
or Bearer ) as well as the properly encoded and formatted value.
Pem
Values for authenticating using a certificate. This is frequently used in kubeconfig files
Fields
PemPath
Implementations§
Source§impl Credentials
impl Credentials
Sourcepub fn raw_bearer_token(raw_token: impl AsRef<str>) -> Credentials
pub fn raw_bearer_token(raw_token: impl AsRef<str>) -> Credentials
Creates a Credentials from a raw (not base64 encoded) token
Sourcepub fn base64_bearer_token(base64_token: impl AsRef<str>) -> Credentials
pub fn base64_bearer_token(base64_token: impl AsRef<str>) -> Credentials
Creates a Credentials from a token that is already base64 encoded
Trait Implementations§
Source§impl Clone for Credentials
impl Clone for Credentials
Source§fn clone(&self) -> Credentials
fn clone(&self) -> Credentials
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Credentials
impl Debug for Credentials
Source§impl PartialEq for Credentials
impl PartialEq for Credentials
impl StructuralPartialEq for Credentials
Auto Trait Implementations§
impl Freeze for Credentials
impl RefUnwindSafe for Credentials
impl Send for Credentials
impl Sync for Credentials
impl Unpin for Credentials
impl UnwindSafe for Credentials
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