Skip to content

Commit 937d534

Browse files
committed
trustpub: Derive Clone for claims structs
1 parent f7fcfbc commit 937d534

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

crates/crates_io_trustpub/src/github/claims.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use jsonwebtoken::{Algorithm, DecodingKey, Validation};
1212
/// Publishing" implementation.
1313
///
1414
/// See <https://docs.github.com/en/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect#understanding-the-oidc-token>.
15-
#[derive(Debug, serde::Serialize, serde::Deserialize)]
15+
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1616
pub struct GitHubClaims {
1717
pub aud: String,
1818
#[serde(with = "ts_seconds")]

crates/crates_io_trustpub/src/gitlab/claims.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use jsonwebtoken::{Algorithm, DecodingKey, Validation};
1212
/// Publishing" implementation.
1313
///
1414
/// See <https://docs.gitlab.com/ci/secrets/id_token_authentication/#token-payload>.
15-
#[derive(Debug, serde::Serialize, serde::Deserialize)]
15+
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
1616
pub struct GitLabClaims {
1717
pub aud: String,
1818
#[serde(with = "ts_seconds")]

crates/crates_io_trustpub/src/unverified.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static EMPTY_KEY: LazyLock<DecodingKey> = LazyLock::new(|| DecodingKey::from_sec
2929
/// validation. Specifically, this only extracts the `iss` claim, which is
3030
/// used to look up the corresponding OIDC key set to then verify the
3131
/// JWT signature.
32-
#[derive(Debug, Deserialize)]
32+
#[derive(Debug, Clone, Deserialize)]
3333
pub struct UnverifiedClaims {
3434
pub iss: String,
3535
}

0 commit comments

Comments
 (0)