pub enum TokenRole {
A,
B,
C,
}transport only.Expand description
Which token of the registration handshake a value is.
the Receiver Platform must create a unique credentials token:
CREDENTIALS_TOKEN_A… The Sender generates a unique credentials token:CREDENTIALS_TOKEN_B… The Receiver generates a unique credentials token:CREDENTIALS_TOKEN_C.
The distinction matters at runtime because Token A is scoped:
When a server receives a request with a valid
CREDENTIALS_TOKEN_A, on another module thancredentialsorversions, the server SHALL respond with an HTTP401 - Unauthorizedstatus code.
Spec: 2.3.0 §credentials_registration, §transport_and_format_authorization_header
Variants§
A
CREDENTIALS_TOKEN_A: the bootstrap token, valid only for credentials and versions.
B
CREDENTIALS_TOKEN_B: the token the Sender gives the Receiver in the POST.
C
CREDENTIALS_TOKEN_C: the token the Receiver returns, used for everything afterwards.
Implementations§
Trait Implementations§
impl Copy for TokenRole
impl Eq for TokenRole
impl StructuralPartialEq for TokenRole
Auto Trait Implementations§
impl Freeze for TokenRole
impl RefUnwindSafe for TokenRole
impl Send for TokenRole
impl Sync for TokenRole
impl Unpin for TokenRole
impl UnsafeUnpin for TokenRole
impl UnwindSafe for TokenRole
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.