Skip to content

Azure AD and private_key_jwt - how to make it work #762

Answered by zandbelt
juur asked this question in Q&A
Discussion options

You must be logged in to vote

this should be better:

diff --git a/src/jose.c b/src/jose.c
index 9423500..ee1f25f 100644
--- a/src/jose.c
+++ b/src/jose.c
@@ -880,6 +880,8 @@ apr_byte_t oidc_jwt_sign(apr_pool_t *pool, oidc_jwt_t *jwt, oidc_jwk_t *jwk,
                oidc_jwt_hdr_set(jwt, CJOSE_HDR_KID, jwt->header.kid);
        if (jwt->header.enc)
                oidc_jwt_hdr_set(jwt, CJOSE_HDR_ENC, jwt->header.enc);
+       if (jwt->header.x5t)
+               oidc_jwt_hdr_set(jwt, OIDC_JOSE_JWK_X5T_STR, jwt->header.x5t);
 
        if (jwt->cjose_jws)
                cjose_jws_release(jwt->cjose_jws);
diff --git a/src/jose.h b/src/jose.h
index 5bbc20f..96773b5 100644
--- a/src/jose.h
+++ b/src/jose.h
@@ -204,6 +204,…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@zandbelt
Comment options

@juur
Comment options

@zandbelt
Comment options

@juur
Comment options

@zandbelt
Comment options

Comment options

You must be logged in to vote
2 replies
@juur
Comment options

@zandbelt
Comment options

Answer selected by juur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants