Struct ClientCredentials
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 a non-RootSeed client to authenticate and communicate with a user’s node.
This is exposed to users as a base64-encoded JSON blob.
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§
§impl ClientCredentials
impl ClientCredentials
pub fn from_response( lexe_auth_token: BearerAuthToken, resp: CreateRevocableClientResponse, ) -> ClientCredentials
pub 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].
pub fn try_from_base64_blob(s: &str) -> Result<ClientCredentials, Error>
pub fn try_from_base64_blob(s: &str) -> Result<ClientCredentials, Error>
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§
§impl Clone for ClientCredentials
impl Clone for ClientCredentials
§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 more§impl<'de> Deserialize<'de> for ClientCredentials
impl<'de> Deserialize<'de> for ClientCredentials
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ClientCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<'a> From<&'a ClientCredentials> for CredentialsRef<'a>
impl<'a> From<&'a ClientCredentials> for CredentialsRef<'a>
§fn from(client_credentials: &'a ClientCredentials) -> CredentialsRef<'a>
fn from(client_credentials: &'a ClientCredentials) -> CredentialsRef<'a>
Converts to this type from the input type.
§impl From<ClientCredentials> for Credentials
impl From<ClientCredentials> for Credentials
§fn from(client_credentials: ClientCredentials) -> Credentials
fn from(client_credentials: ClientCredentials) -> Credentials
Converts to this type from the input type.
§impl FromStr for ClientCredentials
impl FromStr for ClientCredentials
§impl Serialize for ClientCredentials
impl Serialize for ClientCredentials
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl !Freeze for ClientCredentials
impl RefUnwindSafe for ClientCredentials
impl Send for ClientCredentials
impl Sync for ClientCredentials
impl Unpin for ClientCredentials
impl UnwindSafe for ClientCredentials
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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