Skip to content
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

Add nonce field in JWT.Claims() #40

Closed
EbonyLouis opened this issue Mar 28, 2024 · 0 comments · Fixed by #45
Closed

Add nonce field in JWT.Claims() #40

EbonyLouis opened this issue Mar 28, 2024 · 0 comments · Fixed by #45
Assignees

Comments

@EbonyLouis
Copy link

EbonyLouis commented Mar 28, 2024

Reason

In our Known Customer Credential Wallet guide we need to be able to include the cNonce in the claims to then be signed and sent over to the issuer

Goal:

 let jwtClaims = JWT.Claims(
        issuer: userBearerDid.uri, // user's DID string
        audience: issuerBearerDid.uri, // Issuer's DID string
        issuedAt: issuedAtDate,
        nonce: cNonce
    )

 let signedJwt = try JWT.sign(did: userBearerDid, claims: jwtClaims)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants