pub enum IdentityToken {
Anonymous,
UserName(String, Password),
X509(Box<X509>, Box<PKey<RsaPrivateKey>>),
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<PKey<RsaPrivateKey>>)
X5090 cert and private key.
IssuedToken(IssuedTokenWrapper)
Issued token
Implementations§
Source§impl IdentityToken
impl IdentityToken
Sourcepub fn new_anonymous() -> IdentityToken
pub fn new_anonymous() -> IdentityToken
Create a new anonymous identity token.
Sourcepub fn new_user_name(
user_name: impl Into<String>,
password: impl Into<Password>,
) -> IdentityToken
pub fn new_user_name( user_name: impl Into<String>, password: impl Into<Password>, ) -> IdentityToken
Create a new user name identity token.
Sourcepub fn new_x509(cert: X509, private_key: PKey<RsaPrivateKey>) -> IdentityToken
pub fn new_x509(cert: X509, private_key: PKey<RsaPrivateKey>) -> IdentityToken
Create a new x509 identity token.
Sourcepub fn new_x509_path(
cert_path: impl AsRef<Path>,
key_path: impl AsRef<Path>,
) -> Result<IdentityToken, Error>
pub fn new_x509_path( cert_path: impl AsRef<Path>, key_path: impl AsRef<Path>, ) -> Result<IdentityToken, 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,
) -> IdentityToken
pub fn new_issued_token( token_source: impl IssuedTokenSource + 'static, ) -> IdentityToken
Create a new issued token based identity token.
Sourcepub fn new_issued_token_arc(
token_source: Arc<dyn IssuedTokenSource>,
) -> IdentityToken
pub fn new_issued_token_arc( token_source: Arc<dyn IssuedTokenSource>, ) -> IdentityToken
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 UnsafeUnpin 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