Skip to main content

ory_client/models/
verification_error_code.rs

1/*
2 * Ory APIs
3 *
4 * # Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.  ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages:  | Language       | Download SDK                                                     | Documentation                                                                        | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart           | [pub.dev](https://pub.dev/packages/ory_client)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md)       | | .NET           | [nuget.org](https://www.nuget.org/packages/Ory.Client/)          | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md)     | | Elixir         | [hex.pm](https://hex.pm/packages/ory_client)                     | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md)     | | Go             | [github.com](https://github.com/ory/client-go)                   | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md)         | | Java           | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md)       | | JavaScript     | [npmjs.com](https://www.npmjs.com/package/@ory/client)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch)           | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) |  | PHP            | [packagist.org](https://packagist.org/packages/ory/client)       | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md)        | | Python         | [pypi.org](https://pypi.org/project/ory-client/)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md)     | | Ruby           | [rubygems.org](https://rubygems.org/gems/ory-client)             | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md)       | | Rust           | [crates.io](https://crates.io/crates/ory-client)                 | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md)       | 
5 *
6 * The version of the OpenAPI document: v1.22.40
7 * Contact: support@ory.sh
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// VerificationErrorCode : - VERIFICATION_ERROR_UNSPECIFIED: No error (key is valid)  - VERIFICATION_ERROR_INVALID_FORMAT: Credential format is invalid  - VERIFICATION_ERROR_EXPIRED: Credential has expired  - VERIFICATION_ERROR_REVOKED: Credential has been revoked  - VERIFICATION_ERROR_NOT_FOUND: Credential not found in database  - VERIFICATION_ERROR_SIGNATURE_INVALID: Cryptographic signature verification failed  - VERIFICATION_ERROR_INTERNAL: Internal server error during verification  - VERIFICATION_ERROR_IP_NOT_ALLOWED: Request IP is not in the key's allowed CIDR ranges  - VERIFICATION_ERROR_RATE_LIMITED: Rate limit quota exhausted (commercial-only)
15/// - VERIFICATION_ERROR_UNSPECIFIED: No error (key is valid)  - VERIFICATION_ERROR_INVALID_FORMAT: Credential format is invalid  - VERIFICATION_ERROR_EXPIRED: Credential has expired  - VERIFICATION_ERROR_REVOKED: Credential has been revoked  - VERIFICATION_ERROR_NOT_FOUND: Credential not found in database  - VERIFICATION_ERROR_SIGNATURE_INVALID: Cryptographic signature verification failed  - VERIFICATION_ERROR_INTERNAL: Internal server error during verification  - VERIFICATION_ERROR_IP_NOT_ALLOWED: Request IP is not in the key's allowed CIDR ranges  - VERIFICATION_ERROR_RATE_LIMITED: Rate limit quota exhausted (commercial-only)
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum VerificationErrorCode {
18    #[serde(rename = "VERIFICATION_ERROR_UNSPECIFIED")]
19    VerificationErrorUnspecified,
20    #[serde(rename = "VERIFICATION_ERROR_INVALID_FORMAT")]
21    VerificationErrorInvalidFormat,
22    #[serde(rename = "VERIFICATION_ERROR_EXPIRED")]
23    VerificationErrorExpired,
24    #[serde(rename = "VERIFICATION_ERROR_REVOKED")]
25    VerificationErrorRevoked,
26    #[serde(rename = "VERIFICATION_ERROR_NOT_FOUND")]
27    VerificationErrorNotFound,
28    #[serde(rename = "VERIFICATION_ERROR_SIGNATURE_INVALID")]
29    VerificationErrorSignatureInvalid,
30    #[serde(rename = "VERIFICATION_ERROR_INTERNAL")]
31    VerificationErrorInternal,
32    #[serde(rename = "VERIFICATION_ERROR_IP_NOT_ALLOWED")]
33    VerificationErrorIpNotAllowed,
34    #[serde(rename = "VERIFICATION_ERROR_RATE_LIMITED")]
35    VerificationErrorRateLimited,
36
37}
38
39impl std::fmt::Display for VerificationErrorCode {
40    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
41        match self {
42            Self::VerificationErrorUnspecified => write!(f, "VERIFICATION_ERROR_UNSPECIFIED"),
43            Self::VerificationErrorInvalidFormat => write!(f, "VERIFICATION_ERROR_INVALID_FORMAT"),
44            Self::VerificationErrorExpired => write!(f, "VERIFICATION_ERROR_EXPIRED"),
45            Self::VerificationErrorRevoked => write!(f, "VERIFICATION_ERROR_REVOKED"),
46            Self::VerificationErrorNotFound => write!(f, "VERIFICATION_ERROR_NOT_FOUND"),
47            Self::VerificationErrorSignatureInvalid => write!(f, "VERIFICATION_ERROR_SIGNATURE_INVALID"),
48            Self::VerificationErrorInternal => write!(f, "VERIFICATION_ERROR_INTERNAL"),
49            Self::VerificationErrorIpNotAllowed => write!(f, "VERIFICATION_ERROR_IP_NOT_ALLOWED"),
50            Self::VerificationErrorRateLimited => write!(f, "VERIFICATION_ERROR_RATE_LIMITED"),
51        }
52    }
53}
54
55impl Default for VerificationErrorCode {
56    fn default() -> VerificationErrorCode {
57        Self::VerificationErrorUnspecified
58    }
59}
60