8
8
using System . Security . Cryptography . X509Certificates ;
9
9
using System . Text . Encodings . Web ;
10
10
using System . Threading . Tasks ;
11
-
12
11
using Microsoft . AspNetCore . Authentication ;
13
12
using Microsoft . Extensions . Logging ;
14
13
using Microsoft . Extensions . Options ;
@@ -145,14 +144,7 @@ protected override Task HandleChallengeAsync(AuthenticationProperties properties
145
144
{
146
145
// Certificate authentication takes place at the connection level. We can't prompt once we're in
147
146
// user code, so the best thing to do is Forbid, not Challenge.
148
- Response . StatusCode = 403 ;
149
- return Task . CompletedTask ;
150
- }
151
-
152
- protected override Task HandleForbiddenAsync ( AuthenticationProperties properties )
153
- {
154
- Response . StatusCode = 403 ;
155
- return Task . CompletedTask ;
147
+ return HandleForbiddenAsync ( properties )
156
148
}
157
149
158
150
private X509ChainPolicy BuildChainPolicy ( X509Certificate2 certificate )
@@ -168,7 +160,7 @@ private X509ChainPolicy BuildChainPolicy(X509Certificate2 certificate)
168
160
revocationMode = X509RevocationMode . NoCheck ;
169
161
}
170
162
171
- X509ChainPolicy chainPolicy = new X509ChainPolicy
163
+ var chainPolicy = new X509ChainPolicy
172
164
{
173
165
RevocationFlag = revocationFlag ,
174
166
RevocationMode = revocationMode ,
0 commit comments