pub struct AccessTokenKeyMaterial {
pub encrypted_payload: EncString,
pub key: EncString,
seed: AccessTokenSeed,
}Expand description
Key material for a new access-token registration.
Fields§
§encrypted_payload: EncStringThe organization key, encrypted under the derived key, for the token holder.
key: EncStringThe derived key’s base64, encrypted under the organization key, so the organization can recover it without the token.
seed: AccessTokenSeedOnly reachable through Self::into_seed.
Implementations§
Source§impl AccessTokenKeyMaterial
impl AccessTokenKeyMaterial
Sourcepub fn into_seed(self) -> AccessTokenSeed
pub fn into_seed(self) -> AccessTokenSeed
Consumes the key material to recover its seed.
Sourcepub fn make<Ids: KeySlotIds>(
ctx: &mut KeyStoreContext<'_, Ids>,
organization_key: Ids::Symmetric,
purpose: KeyPurpose,
) -> Result<Self, AccessTokenError>
pub fn make<Ids: KeySlotIds>( ctx: &mut KeyStoreContext<'_, Ids>, organization_key: Ids::Symmetric, purpose: KeyPurpose, ) -> Result<Self, AccessTokenError>
Makes a random seed, derives the key for purpose, and wraps the organization key for the
token holder and the derived key for the organization.
A missing organization_key surfaces as AccessTokenError::Crypto.
Auto Trait Implementations§
impl Freeze for AccessTokenKeyMaterial
impl RefUnwindSafe for AccessTokenKeyMaterial
impl Send for AccessTokenKeyMaterial
impl Sync for AccessTokenKeyMaterial
impl Unpin for AccessTokenKeyMaterial
impl UnsafeUnpin for AccessTokenKeyMaterial
impl UnwindSafe for AccessTokenKeyMaterial
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Consume a handle, getting back the initial
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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