diff options
author | Vika <vika@fireburn.ru> | 2025-04-06 23:04:09 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2025-04-09 23:31:57 +0300 |
commit | 8c8a63091e68dbfe11bb23b75eea598bafc12966 (patch) | |
tree | bc2d6fc94b463db946cb113dbdc2495c541dea74 /indieauth/src/lib.rs | |
parent | eb29ab94903899a23a688ce066b0fa3a4aea0cc2 (diff) | |
download | kittybox-8c8a63091e68dbfe11bb23b75eea598bafc12966.tar.zst |
kittybox-indieauth: add Eq to enums
You never know when you need it. Change-Id: I323d25977a5e4ee67768cee0f1f7d94b1997224a
Diffstat (limited to 'indieauth/src/lib.rs')
-rw-r--r-- | indieauth/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indieauth/src/lib.rs b/indieauth/src/lib.rs index b3ec098..0fcd32c 100644 --- a/indieauth/src/lib.rs +++ b/indieauth/src/lib.rs @@ -34,7 +34,7 @@ pub use rand; /// Authentication methods supported by the introspection endpoint. /// Note that authentication at the introspection endpoint is /// mandatory. -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[non_exhaustive] pub enum IntrospectionEndpointAuthMethod { /// `Authorization` header with a `Bearer` token. @@ -60,7 +60,7 @@ pub enum IntrospectionEndpointAuthMethod { /// authentication is neccesary to protect tokens. A well-intentioned /// person discovering a leaked token could quickly revoke it without /// disturbing anyone. -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "snake_case")] #[non_exhaustive] pub enum RevocationEndpointAuthMethod { @@ -70,7 +70,7 @@ pub enum RevocationEndpointAuthMethod { } /// The response types supported by the authorization endpoint. -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub enum ResponseType { /// An authorization code will be issued if this response type is @@ -100,7 +100,7 @@ impl ResponseType { /// This type is strictly for usage in the [`Metadata`] response. For /// grant requests and responses, see [`GrantRequest`] and /// [`GrantResponse`]. -#[derive(Copy, Clone, Debug, Serialize, Deserialize)] +#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub enum GrantType { /// The authorization code grant, allowing to exchange an |