cawg_identity/builder/credential_holder.rs
1// Copyright 2024 Adobe. All rights reserved.
2// This file is licensed to you under the Apache License,
3// Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
4// or the MIT license (http://opensource.org/licenses/MIT),
5// at your option.
6
7// Unless required by applicable law or agreed to in writing,
8// this software is distributed on an "AS IS" BASIS, WITHOUT
9// WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or
10// implied. See the LICENSE-MIT and LICENSE-APACHE files for the
11// specific language governing permissions and limitations under
12// each license.
13
14/// An implementation of `AsyncCredentialHolder` is able to generate a signature
15/// over the `SignerPayload` data structure on behalf of a credential holder.
16///
17/// Implementations of this trait will specialize based on the kind of
18/// credential as specified in [§8. Credentials, signatures, and validation
19/// methods] from the CAWG Identity Assertion specification.
20///
21/// [§8. Credentials, signatures, and validation methods]: https://cawg.io/identity/1.1-draft/#_credentials_signatures_and_validation_methods
22#[deprecated(
23 since = "0.14.0",
24 note = "Moved to c2pa::identity::builder::AsyncCredentialHolder"
25)]
26pub use c2pa::identity::builder::AsyncCredentialHolder;
27/// An implementation of `CredentialHolder` is able to generate a signature
28/// over the `SignerPayload` data structure on behalf of a credential holder.
29///
30/// If network calls are to be made, it is better to implement
31/// `AsyncCredentialHolder`.
32///
33/// Implementations of this trait will specialize based on the kind of
34/// credential as specified in [§8. Credentials, signatures, and validation
35/// methods] from the CAWG Identity Assertion specification.
36///
37/// [§8. Credentials, signatures, and validation methods]: https://cawg.io/identity/1.1-draft/#_credentials_signatures_and_validation_methods
38#[deprecated(
39 since = "0.14.0",
40 note = "Moved to c2pa::identity::builder::CredentialHolder"
41)]
42pub use c2pa::identity::builder::CredentialHolder;