use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
pub struct RevocationRequest {
pub token: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub token_type_hint: Option<String>,
#[serde(flatten)]
pub extra: serde_json::Map<String, serde_json::Value>,
}
impl RevocationRequest {
#[must_use]
pub fn new(token: impl Into<String>) -> Self {
Self {
token: token.into(),
token_type_hint: None,
extra: serde_json::Map::new(),
}
}
#[must_use]
pub fn token_type_hint(mut self, token_type_hint: impl Into<String>) -> Self {
self.token_type_hint = Some(token_type_hint.into());
self
}
}