Skip to content

ssi-jwk: Derive macro #653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
timothee-haudebourg opened this issue Mar 25, 2025 · 0 comments
Open

ssi-jwk: Derive macro #653

timothee-haudebourg opened this issue Mar 25, 2025 · 0 comments

Comments

@timothee-haudebourg
Copy link
Contributor

Add a derive macro to automatically implement the JwsPayload, ValidateJwsHeaders and JwtClaimSet for custom JWT types.

For example:

#[derive(Clone, Jwt)]
#[jwt(typ = "oauth-client-attestation+jwt")]
pub struct ClientAttestation {
    pub iss: Issuer,
    pub sub: Subject,
    pub exp: ExpirationTime,
    pub cnf: Confirmation,
    pub iat: Option<IssuedAt>,
    pub nbf: Option<NotBefore>,

    #[serde(flatten)]
    pub other: AnyClaims,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant