This repository was archived by the owner on Sep 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,19 @@ public class DPoPProofTokenFactory
2424 public DPoPProofTokenFactory ( string proofKey )
2525 {
2626 _jwk = new JsonWebKey ( proofKey ) ;
27+
28+ if ( _jwk . Alg . IsNullOrEmpty ( ) )
29+ {
30+ throw new ArgumentException ( "alg must be set on proof key" ) ;
31+ }
2732 }
2833
2934 /// <summary>
3035 /// Creates a DPoP proof token.
3136 /// </summary>
3237 public DPoPProof CreateProofToken ( DPoPProofRequest request )
3338 {
34- var jsonWebKey = _jwk ; // new JsonWebKey(request.DPoPJsonWebKey);
39+ var jsonWebKey = _jwk ;
3540
3641 // jwk: representing the public key chosen by the client, in JSON Web Key (JWK) [RFC7517] format,
3742 // as defined in Section 4.1.3 of [RFC7515]. MUST NOT contain a private key.
@@ -62,7 +67,6 @@ public DPoPProof CreateProofToken(DPoPProofRequest request)
6267
6368 var header = new Dictionary < string , object > ( )
6469 {
65- //{ "alg", "RS265" }, // JsonWebTokenHandler requires adding this itself
6670 { "typ" , JwtClaimTypes . JwtTypes . DPoPProofToken } ,
6771 { JwtClaimTypes . JsonWebKey , jwk } ,
6872 } ;
You can’t perform that action at this time.
0 commit comments