fusionauth_rust_client/models/
cose_algorithm_identifier.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/// CoseAlgorithmIdentifier : A number identifying a cryptographic algorithm. Values should be registered with the <a  href=\"https:www.iana.orgassignmentscosecose.xhtml#algorithms\">IANA COSE Algorithms registry<a>
15/// A number identifying a cryptographic algorithm. Values should be registered with the <a  href=\"https:www.iana.orgassignmentscosecose.xhtml#algorithms\">IANA COSE Algorithms registry<a>
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum CoseAlgorithmIdentifier {
18    #[serde(rename = "ES256")]
19    Es256,
20    #[serde(rename = "ES384")]
21    Es384,
22    #[serde(rename = "ES512")]
23    Es512,
24    #[serde(rename = "RS256")]
25    Rs256,
26    #[serde(rename = "RS384")]
27    Rs384,
28    #[serde(rename = "RS512")]
29    Rs512,
30    #[serde(rename = "PS256")]
31    Ps256,
32    #[serde(rename = "PS384")]
33    Ps384,
34    #[serde(rename = "PS512")]
35    Ps512,
36
37}
38
39impl std::fmt::Display for CoseAlgorithmIdentifier {
40    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
41        match self {
42            Self::Es256 => write!(f, "ES256"),
43            Self::Es384 => write!(f, "ES384"),
44            Self::Es512 => write!(f, "ES512"),
45            Self::Rs256 => write!(f, "RS256"),
46            Self::Rs384 => write!(f, "RS384"),
47            Self::Rs512 => write!(f, "RS512"),
48            Self::Ps256 => write!(f, "PS256"),
49            Self::Ps384 => write!(f, "PS384"),
50            Self::Ps512 => write!(f, "PS512"),
51        }
52    }
53}
54
55impl Default for CoseAlgorithmIdentifier {
56    fn default() -> CoseAlgorithmIdentifier {
57        Self::Es256
58    }
59}
60