pub struct TokenRequest {
pub username: String,
pub app_ids: Vec<String>,
pub extra: Map<String, Value>,
}Expand description
Input to the token-mint pipeline. Carries the username being minted for, the apps the token will be scoped to, and a place for plugins to drop extra claims.
Serialize + Deserialize derives carry the wire shape
(cross-component hook chains via WIT, bincode payload). The extra claim accumulator
rides the wire as a HashMap<String, String> (each value
JSON-encoded) so that bincode can round-trip serde_json::Value
payloads without hitting DeserializeAnyNotSupported. The in-process
Rust API still presents the field as a serde_json::Map<String, Value>.
Fields§
§username: StringJWT subject (typically the username / email).
app_ids: Vec<String>App ids this token grants access to. Plugins may inspect this to make per-app decisions.
extra: Map<String, Value>Mutable claim accumulator. Plugins read existing claims here
and mutate to attach their own. Yeti-canonical claims (sub,
exp, apps, etc.) are populated by the host before the
pipeline runs and after it finishes; plugins should treat
them as read-only inputs and write to keys they own.
Trait Implementations§
Source§impl Clone for TokenRequest
impl Clone for TokenRequest
Source§fn clone(&self) -> TokenRequest
fn clone(&self) -> TokenRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more