Fix functional unit test after hosting changes
This commit is contained in:
parent
062eeeeb94
commit
0249c6181c
|
|
@ -2,6 +2,8 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Http.Internal;
|
||||
using Microsoft.AspNet.Identity;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
|
||||
|
|
@ -49,6 +51,8 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
options.SignInScheme = new IdentityCookieOptions().ExternalCookieAuthenticationScheme;
|
||||
});
|
||||
|
||||
// Hosting doesn't add IHttpContextAccessor by default
|
||||
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||
// Identity services
|
||||
services.TryAddSingleton<IdentityMarkerService>();
|
||||
services.TryAddScoped<IUserValidator<TUser>, UserValidator<TUser>>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue