authnz_common/types/users/
logout.rs1#[cfg(any(feature = "app-server-types", feature = "authnz-server-types"))]
4use impulse_server_kit::salvo;
5#[cfg(any(feature = "app-server-types", feature = "authnz-server-types"))]
6use salvo::oapi::ToSchema;
7use serde::{Deserialize, Serialize};
8
9#[cfg_attr(any(feature = "app-server-types", feature = "authnz-server-types"), derive(ToSchema))]
10#[derive(Deserialize, Serialize, PartialEq, Eq, Hash, Clone, Debug)]
11pub struct UserLogoutRequest {
16 pub access_token: String,
18 pub refresh_token: String,
20}
21
22impl UserLogoutRequest {
23 pub fn new(act: impl ToString, rft: impl ToString) -> Self {
25 Self {
26 access_token: act.to_string(),
27 refresh_token: rft.to_string(),
28 }
29 }
30}