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
24
24
public DPoPProofTokenFactory ( string proofKey )
25
25
{
26
26
_jwk = new JsonWebKey ( proofKey ) ;
27
+
28
+ if ( _jwk . Alg . IsNullOrEmpty ( ) )
29
+ {
30
+ throw new ArgumentException ( "alg must be set on proof key" ) ;
31
+ }
27
32
}
28
33
29
34
/// <summary>
30
35
/// Creates a DPoP proof token.
31
36
/// </summary>
32
37
public DPoPProof CreateProofToken ( DPoPProofRequest request )
33
38
{
34
- var jsonWebKey = _jwk ; // new JsonWebKey(request.DPoPJsonWebKey);
39
+ var jsonWebKey = _jwk ;
35
40
36
41
// jwk: representing the public key chosen by the client, in JSON Web Key (JWK) [RFC7517] format,
37
42
// as defined in Section 4.1.3 of [RFC7515]. MUST NOT contain a private key.
@@ -62,7 +67,6 @@ public DPoPProof CreateProofToken(DPoPProofRequest request)
62
67
63
68
var header = new Dictionary < string , object > ( )
64
69
{
65
- //{ "alg", "RS265" }, // JsonWebTokenHandler requires adding this itself
66
70
{ "typ" , JwtClaimTypes . JwtTypes . DPoPProofToken } ,
67
71
{ JwtClaimTypes . JsonWebKey , jwk } ,
68
72
} ;
You can’t perform that action at this time.
0 commit comments