Skip to main content

openstack_keystone_core/revoke/
error.rs

1// Licensed under the Apache License, Version 2.0 (the "License");
2// you may not use this file except in compliance with the License.
3// You may obtain a copy of the License at
4//
5//     http://www.apache.org/licenses/LICENSE-2.0
6//
7// Unless required by applicable law or agreed to in writing, software
8// distributed under the License is distributed on an "AS IS" BASIS,
9// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10// See the License for the specific language governing permissions and
11// limitations under the License.
12//
13// SPDX-License-Identifier: Apache-2.0
14//! Token revocation errors.
15
16use thiserror::Error;
17
18/// Revoke provider error.
19#[derive(Error, Debug)]
20pub enum RevokeProviderError {
21    /// Conflict.
22    #[error("conflict: {0}")]
23    Conflict(String),
24
25    /// Driver error.
26    #[error("backend driver error: {0}")]
27    Driver(String),
28
29    /// No audit ID in the token.
30    #[error("token does not have the audit_id set")]
31    TokenHasNoAuditId,
32
33    /// Unsupported driver.
34    #[error("unsupported driver `{0}` for the revoke provider")]
35    UnsupportedDriver(String),
36}