identity_jose/jws/format.rs
1// Copyright 2020-2023 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4/// The serialization format used for the JWS.
5#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Default)]
6pub enum JwsFormat {
7 /// JWS Compact Serialization (<https://www.rfc-editor.org/rfc/rfc7515#section-3.1>).
8 #[default]
9 Compact,
10 /// General JWS JSON Serialization (<https://www.rfc-editor.org/rfc/rfc7515#section-7.2.1>).
11 General,
12 /// Flattened JWS JSON Serialization (<https://www.rfc-editor.org/rfc/rfc7515#section-7.2.2>).
13 ///
14 /// Should be used for single signature or MAC use cases.
15 Flatten,
16}