pub enum IdentityToken {
Anonymous,
UserName(String, Password),
X509(Box<X509>, Box<PrivateKey>),
IssuedToken(IssuedTokenWrapper),
}
Expand description
Client-side identity token representation.
Variants§
Anonymous
Anonymous identity token
UserName(String, Password)
User name and a password
X509(Box<X509>, Box<PrivateKey>)
X5090 cert and private key.
IssuedToken(IssuedTokenWrapper)
Issued token
Implementations§
Source§impl IdentityToken
impl IdentityToken
Sourcepub fn new_anonymous() -> Self
pub fn new_anonymous() -> Self
Create a new anonymous identity token.
Sourcepub fn new_user_name(
user_name: impl Into<String>,
password: impl Into<Password>,
) -> Self
pub fn new_user_name( user_name: impl Into<String>, password: impl Into<Password>, ) -> Self
Create a new user name identity token.
Sourcepub fn new_x509(cert: X509, private_key: PrivateKey) -> Self
pub fn new_x509(cert: X509, private_key: PrivateKey) -> Self
Create a new x509 identity token.
Sourcepub fn new_x509_path(
cert_path: impl AsRef<Path>,
key_path: impl AsRef<Path>,
) -> Result<Self, Error>
pub fn new_x509_path( cert_path: impl AsRef<Path>, key_path: impl AsRef<Path>, ) -> Result<Self, Error>
Create a new x509 identity token from a path to a certificate and private key.
Sourcepub fn new_issued_token(token_source: impl IssuedTokenSource + 'static) -> Self
pub fn new_issued_token(token_source: impl IssuedTokenSource + 'static) -> Self
Create a new issued token based identity token.
Sourcepub fn new_issued_token_arc(token_source: Arc<dyn IssuedTokenSource>) -> Self
pub fn new_issued_token_arc(token_source: Arc<dyn IssuedTokenSource>) -> Self
Create a new issued token based identity token from a shared reference.
Trait Implementations§
Source§impl Clone for IdentityToken
impl Clone for IdentityToken
Source§fn clone(&self) -> IdentityToken
fn clone(&self) -> IdentityToken
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 moreAuto Trait Implementations§
impl Freeze for IdentityToken
impl !RefUnwindSafe for IdentityToken
impl Send for IdentityToken
impl Sync for IdentityToken
impl Unpin for IdentityToken
impl !UnwindSafe for IdentityToken
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