pub struct SessionSummary {
pub created_at: String,
pub expires_at: String,
pub id: String,
pub is_current: bool,
pub kind: String,
pub user_agent: Option<String>,
}Expand description
One entry of the session list returned by GET /api/v1/auth/sessions.
A session is the durable side of an authentication: one entry
exists for every browser login (kind = "web") and every redeemed
CLI grant (kind = "cli"). Sessions can be inspected and revoked
from the user’s settings UI.
JSON schema
{
"description": "One entry of the session list returned by `GET /api/v1/auth/sessions`.\n\nA session is the durable side of an authentication: one entry\nexists for every browser login (`kind = \"web\"`) and every redeemed\nCLI grant (`kind = \"cli\"`). Sessions can be inspected and revoked\nfrom the user's settings UI.",
"type": "object",
"required": [
"created_at",
"expires_at",
"id",
"is_current",
"kind"
],
"properties": {
"created_at": {
"description": "RFC 3339 timestamp of session creation.",
"type": "string"
},
"expires_at": {
"description": "RFC 3339 timestamp at which the session token stops being\naccepted.",
"type": "string"
},
"id": {
"description": "Stable session ID. Use this with\n`DELETE /api/v1/auth/sessions/{id}` to revoke.",
"type": "string"
},
"is_current": {
"description": "`true` if this entry corresponds to the session that issued\nthe current request — useful for the UI to mark the \"this\ndevice\" entry and warn before revoking it.",
"type": "boolean"
},
"kind": {
"description": "`\"web\"` for browser logins (password, GitHub OAuth, dev login),\n`\"cli\"` for CLI tokens minted via `/api/v1/auth/cli/redeem`.",
"type": "string"
},
"user_agent": {
"description": "`User-Agent` header captured at session creation. Useful for\n\"is that you on Firefox?\" recognition. May be absent for\nclients that omit the header.",
"type": [
"string",
"null"
]
}
}
}Fields§
§created_at: StringRFC 3339 timestamp of session creation.
expires_at: StringRFC 3339 timestamp at which the session token stops being accepted.
id: StringStable session ID. Use this with
DELETE /api/v1/auth/sessions/{id} to revoke.
is_current: booltrue if this entry corresponds to the session that issued
the current request — useful for the UI to mark the “this
device” entry and warn before revoking it.
kind: String"web" for browser logins (password, GitHub OAuth, dev login),
"cli" for CLI tokens minted via /api/v1/auth/cli/redeem.
user_agent: Option<String>User-Agent header captured at session creation. Useful for
“is that you on Firefox?” recognition. May be absent for
clients that omit the header.
Trait Implementations§
Source§impl Clone for SessionSummary
impl Clone for SessionSummary
Source§fn clone(&self) -> SessionSummary
fn clone(&self) -> SessionSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more