pub struct CreateTokenResponse {
pub id: String,
pub token: String,
pub name: String,
pub scopes: Vec<TokenScope>,
pub expires_at: DateTime<Utc>,
}Expand description
Response returned once at token creation.
The token field is the raw JWT and is never persisted nor returned again.
Fields§
§id: StringUUID identifier — also the JWT jti claim (the revocation handle).
token: StringThe raw JWT bearer token. Shown only once; store it securely.
name: StringThe human-friendly label echoed back from the request.
scopes: Vec<TokenScope>The scopes baked into the token.
expires_at: DateTime<Utc>When the token expires.
Trait Implementations§
Source§impl Clone for CreateTokenResponse
impl Clone for CreateTokenResponse
Source§fn clone(&self) -> CreateTokenResponse
fn clone(&self) -> CreateTokenResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for CreateTokenResponse
impl ComposeSchema for CreateTokenResponse
Source§impl Debug for CreateTokenResponse
impl Debug for CreateTokenResponse
Source§impl<'de> Deserialize<'de> for CreateTokenResponse
impl<'de> Deserialize<'de> for CreateTokenResponse
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
Source§impl Serialize for CreateTokenResponse
impl Serialize for CreateTokenResponse
Auto Trait Implementations§
impl Freeze for CreateTokenResponse
impl RefUnwindSafe for CreateTokenResponse
impl Send for CreateTokenResponse
impl Sync for CreateTokenResponse
impl Unpin for CreateTokenResponse
impl UnsafeUnpin for CreateTokenResponse
impl UnwindSafe for CreateTokenResponse
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