pub struct AccessKey(/* private fields */);Expand description
A CipherStash access key.
Access keys have the format CSAK<key_id>.<key_secret> and are used to
authenticate with the CipherStash Token Service (CTS).
The inner value is stored as a SecretToken, so it is zeroized on drop
and hidden from debug output.
§Parsing
use stack_auth::AccessKey;
let key: AccessKey = "CSAKmyKeyId.myKeySecret".parse().unwrap();Invalid keys are rejected:
use stack_auth::AccessKey;
assert!("not-a-valid-key".parse::<AccessKey>().is_err());
assert!("CSAKmissing-dot".parse::<AccessKey>().is_err());
assert!("CSAK.no-key-id".parse::<AccessKey>().is_err());
assert!("CSAKno-secret.".parse::<AccessKey>().is_err());Trait Implementations§
impl OpaqueDebug for AccessKey
Auto Trait Implementations§
impl Freeze for AccessKey
impl RefUnwindSafe for AccessKey
impl Send for AccessKey
impl Sync for AccessKey
impl Unpin for AccessKey
impl UnsafeUnpin for AccessKey
impl UnwindSafe for AccessKey
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more