#[non_exhaustive]pub struct CampBootstrapCredential {
pub token: String,
pub camp_id: PrincipalId,
pub created_at: i64,
pub expires_at: i64,
pub revoked: bool,
}Expand description
One row in the camp-bootstrap-credential table.
The opaque token is a 32-byte CSPRNG secret encoded base64url-no-pad —
the camp presents this string to the future /token endpoint to mint
short-TTL access tokens. Stored verbatim (cheers retains the secret
because the camp must present it back; this is in contrast to the
service-principal Ed25519 secret which leaves cheers exactly once).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.token: String§camp_id: PrincipalIdThe camp principal this credential authenticates for. kind is
always PrincipalKind::Camp; the authority refuses to construct
otherwise.
created_at: i64§expires_at: i64§revoked: boolSet once the camp principal was revoked (cascade or direct).
Trait Implementations§
Source§impl Clone for CampBootstrapCredential
impl Clone for CampBootstrapCredential
Source§impl Debug for CampBootstrapCredential
impl Debug for CampBootstrapCredential
Source§impl<'de> Deserialize<'de> for CampBootstrapCredential
impl<'de> Deserialize<'de> for CampBootstrapCredential
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for CampBootstrapCredential
Source§impl PartialEq for CampBootstrapCredential
impl PartialEq for CampBootstrapCredential
Source§impl Serialize for CampBootstrapCredential
impl Serialize for CampBootstrapCredential
impl StructuralPartialEq for CampBootstrapCredential
Auto Trait Implementations§
impl Freeze for CampBootstrapCredential
impl RefUnwindSafe for CampBootstrapCredential
impl Send for CampBootstrapCredential
impl Sync for CampBootstrapCredential
impl Unpin for CampBootstrapCredential
impl UnsafeUnpin for CampBootstrapCredential
impl UnwindSafe for CampBootstrapCredential
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