pub struct Whoami {
pub user_name: String,
pub agent_name: String,
pub api_version: &'static str,
pub server_version: &'static str,
}Expand description
What an agent is told about its own token: GET /api/v1/agent/whoami.
The only route that answers an agent a question about itself. Without it a
token is opaque to the machine holding it: kasl server connect could
confirm that a token works, but not whose it is, and a token pasted from
the wrong chat window would file this machine’s days under a colleague’s
name without a word. The check belongs at connect time, where a person is
watching.
Fields§
§user_name: StringThe employee this agent reports for, as the server displays them.
agent_name: StringThe label the administrator gave this agent, typically the machine.
api_version: &'static strThe API version this path belongs to. Sent so a client can say “this server speaks v1” without parsing the URL it just called.
server_version: &'static strThe server’s own version, for the connect summary and for support
questions. Already public on /health; repeated here so a connecting
agent needs one round trip, not two.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Whoami
impl RefUnwindSafe for Whoami
impl Send for Whoami
impl Sync for Whoami
impl Unpin for Whoami
impl UnsafeUnpin for Whoami
impl UnwindSafe for Whoami
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more