Skip to content

Commit ec60a57

Browse files
committed
Code cleanup
1 parent c90e916 commit ec60a57

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Security/Authentication/Negotiate/src/NegotiateHandler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
171171
if (IsHttp2)
172172
{
173173
// Not supported. We don't throw because Negotiate may be set as the default auth
174-
// handler on a server that's running HTTP/1 and HTTP/2.
174+
// handler on a server that's running HTTP/1 and HTTP/2. We'll challenge HTTP/2 requests
175+
// that require auth and they'll downgrade to HTTP/1.1.
175176
return AuthenticateResult.NoResult();
176177
}
177178

@@ -199,14 +200,14 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
199200
{
200201
Principal = user
201202
};
202-
await Events.OnAuthenticated(authenticatedContext);
203+
await Events.Authenticated(authenticatedContext);
203204

204205
if (authenticatedContext.Result != null)
205206
{
206207
return authenticatedContext.Result;
207208
}
208209

209-
var ticket = new AuthenticationTicket(user, Scheme.Name);
210+
var ticket = new AuthenticationTicket(authenticatedContext.Principal, authenticatedContext.Properties, Scheme.Name);
210211
return AuthenticateResult.Success(ticket);
211212
}
212213

0 commit comments

Comments
 (0)