pub struct ClientCredentials {
pub user_pk: Option<UserPk>,
pub lexe_auth_token: BearerAuthToken,
pub client_pk: PublicKey,
pub rev_client_key_der: LxPrivatePkcs8KeyDer,
pub rev_client_cert_der: LxCertificateDer,
pub eph_ca_cert_der: LxCertificateDer,
}Expand description
All secrets required for an SDK client to authenticate with a user’s node. Encoded as a base64 JSON blob for easy transport (e.g. via env var or config file).
Fields§
§user_pk: Option<UserPk>The user public key.
Always Some(_) if the credentials were created by node-v0.8.11+.
lexe_auth_token: BearerAuthTokenThe base64 encoded long-lived connect token.
client_pk: PublicKeyThe hex-encoded client public key.
rev_client_key_der: LxPrivatePkcs8KeyDerThe DER-encoded client key.
rev_client_cert_der: LxCertificateDerThe DER-encoded cert of the revocable client.
eph_ca_cert_der: LxCertificateDerThe DER-encoded cert of the ephemeral issuing CA.
Implementations§
Source§impl ClientCredentials
impl ClientCredentials
pub fn from_response( lexe_auth_token: BearerAuthToken, resp: CreateRevocableClientResponse, ) -> Self
Sourcepub fn to_base64_blob(&self) -> String
pub fn to_base64_blob(&self) -> String
Encodes a ClientCredentials to a base64 blob using
base64::engine::general_purpose::STANDARD_NO_PAD.
Sourcepub fn try_from_base64_blob(s: &str) -> Result<Self>
pub fn try_from_base64_blob(s: &str) -> Result<Self>
Decodes a ClientCredentials from a base64 blob encoded with either
base64::engine::general_purpose::STANDARD or
base64::engine::general_purpose::STANDARD_NO_PAD.
Trait Implementations§
Source§impl Clone for ClientCredentials
impl Clone for ClientCredentials
Source§fn clone(&self) -> ClientCredentials
fn clone(&self) -> ClientCredentials
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 ClientCredentials
impl Debug for ClientCredentials
Source§impl<'de> Deserialize<'de> for ClientCredentials
impl<'de> Deserialize<'de> for ClientCredentials
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a ClientCredentials> for CredentialsRef<'a>
impl<'a> From<&'a ClientCredentials> for CredentialsRef<'a>
Source§fn from(client_credentials: &'a ClientCredentials) -> Self
fn from(client_credentials: &'a ClientCredentials) -> Self
Converts to this type from the input type.
Source§impl From<ClientCredentials> for Credentials
impl From<ClientCredentials> for Credentials
Source§fn from(client_credentials: ClientCredentials) -> Self
fn from(client_credentials: ClientCredentials) -> Self
Converts to this type from the input type.
Source§impl FromStr for ClientCredentials
impl FromStr for ClientCredentials
Auto Trait Implementations§
impl !Freeze for ClientCredentials
impl RefUnwindSafe for ClientCredentials
impl Send for ClientCredentials
impl Sync for ClientCredentials
impl Unpin for ClientCredentials
impl UnsafeUnpin for ClientCredentials
impl UnwindSafe for ClientCredentials
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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