diff options
Diffstat (limited to 'entities/src/forms/oauth/token/revocation.rs')
-rw-r--r-- | entities/src/forms/oauth/token/revocation.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/entities/src/forms/oauth/token/revocation.rs b/entities/src/forms/oauth/token/revocation.rs new file mode 100644 index 0000000..b64a970 --- /dev/null +++ b/entities/src/forms/oauth/token/revocation.rs @@ -0,0 +1,23 @@ +use serde::{Deserialize, Serialize}; + +use crate::{ClientId, ClientSecret, OAuthToken}; + +/// Form to be submitted when revoking an OAuth token. +/// +/// See also the [API Documentation](https://docs.joinmastodon.org/methods/oauth/#revoke) +#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)] +pub struct Revocation { + client_id: ClientId, + client_secret: ClientSecret, + token: OAuthToken, +} + +impl Revocation { + pub fn new(client_id: ClientId, client_secret: ClientSecret, token: OAuthToken) -> Self { + Self { + client_id, + client_secret, + token, + } + } +} |