fusionauth_rust_client/models/
key_algorithm.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.57.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum KeyAlgorithm {
17    #[serde(rename = "ES256")]
18    Es256,
19    #[serde(rename = "ES384")]
20    Es384,
21    #[serde(rename = "ES512")]
22    Es512,
23    #[serde(rename = "HS256")]
24    Hs256,
25    #[serde(rename = "HS384")]
26    Hs384,
27    #[serde(rename = "HS512")]
28    Hs512,
29    #[serde(rename = "RS256")]
30    Rs256,
31    #[serde(rename = "RS384")]
32    Rs384,
33    #[serde(rename = "RS512")]
34    Rs512,
35
36}
37
38impl std::fmt::Display for KeyAlgorithm {
39    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
40        match self {
41            Self::Es256 => write!(f, "ES256"),
42            Self::Es384 => write!(f, "ES384"),
43            Self::Es512 => write!(f, "ES512"),
44            Self::Hs256 => write!(f, "HS256"),
45            Self::Hs384 => write!(f, "HS384"),
46            Self::Hs512 => write!(f, "HS512"),
47            Self::Rs256 => write!(f, "RS256"),
48            Self::Rs384 => write!(f, "RS384"),
49            Self::Rs512 => write!(f, "RS512"),
50        }
51    }
52}
53
54impl Default for KeyAlgorithm {
55    fn default() -> KeyAlgorithm {
56        Self::Es256
57    }
58}
59