pub struct RedeemResponse {
pub token: String,
pub user: User,
}Expand description
Response body for POST /api/v1/auth/cli/redeem.
Returns the new bearer token plus the authenticated user. The token is shown to the API ONCE; pathbase cannot recover the plaintext if it is lost.
JSON schema
{
"description": "Response body for `POST /api/v1/auth/cli/redeem`.\n\nReturns the new bearer token plus the authenticated user. The token\nis shown to the API ONCE; pathbase cannot recover the plaintext if\nit is lost.",
"type": "object",
"required": [
"token",
"user"
],
"properties": {
"token": {
"description": "Opaque session bearer token, prefixed `pat_…`. Send as\n`Authorization: Bearer <token>` on subsequent API calls. Treat\nas a secret; only its hash is retained server-side, so it\ncannot be re-shown if lost — the user must re-pair the CLI.",
"type": "string"
},
"user": {
"$ref": "#/components/schemas/User"
}
}
}Fields§
§token: StringOpaque session bearer token, prefixed pat_…. Send as
Authorization: Bearer <token> on subsequent API calls. Treat
as a secret; only its hash is retained server-side, so it
cannot be re-shown if lost — the user must re-pair the CLI.
user: UserTrait Implementations§
Source§impl Clone for RedeemResponse
impl Clone for RedeemResponse
Source§fn clone(&self) -> RedeemResponse
fn clone(&self) -> RedeemResponse
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 Debug for RedeemResponse
impl Debug for RedeemResponse
Source§impl<'de> Deserialize<'de> for RedeemResponse
impl<'de> Deserialize<'de> for RedeemResponse
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
Auto Trait Implementations§
impl Freeze for RedeemResponse
impl RefUnwindSafe for RedeemResponse
impl Send for RedeemResponse
impl Sync for RedeemResponse
impl Unpin for RedeemResponse
impl UnsafeUnpin for RedeemResponse
impl UnwindSafe for RedeemResponse
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