pub struct ClientCredentials {
pub user_pk: Option<UserPk>,
pub client_pk: PublicKey,
pub rev_client_key_der: LxPrivatePkcs8KeyDer,
pub rev_client_cert_der: LxCertificateDer,
pub eph_ca_cert_der: LxCertificateDer,
pub gateway_proxy_token: Option<BearerAuthToken>,
}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+.
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.
gateway_proxy_token: Option<BearerAuthToken>The long-lived LexeScope::GatewayProxy token for connecting to the
user’s node. Always Some for user nodes.
Implementations§
Source§impl ClientCredentials
impl ClientCredentials
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more