This commit is contained in:
2018-07-19 16:46:55 +02:00
parent 704e38807a
commit e418bebcc8
3 changed files with 5 additions and 10 deletions

View File

@ -25,7 +25,7 @@
] ]
}, },
"tooling": { "tooling": {
"defaultNamespace": "Yavsc" "defaultNamespace": "test"
}, },
"dependencies": { "dependencies": {
"Newtonsoft.Json": "9.0.1", "Newtonsoft.Json": "9.0.1",
@ -47,4 +47,4 @@
"test": "xunit.runner.dnx" "test": "xunit.runner.dnx"
}, },
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f" "userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f"
} }

View File

@ -3,7 +3,7 @@ using Microsoft.Extensions.Logging;
using Yavsc.Lib; using Yavsc.Lib;
using Yavsc.Services; using Yavsc.Services;
namespace Yavsc.test namespace test
{ {
public class Program public class Program
{ {
@ -14,7 +14,7 @@ namespace Yavsc.test
var hostengnine = host var hostengnine = host
.UseEnvironment("Development") .UseEnvironment("Development")
.UseServer("test") .UseServer("test")
.UseStartup<Startup>() .UseStartup<test.Startup>()
.Build(); .Build();
var app = hostengnine.Start(); var app = hostengnine.Start();
@ -26,4 +26,4 @@ namespace Yavsc.test
logger.LogInformation("Finished"); logger.LogInformation("Finished");
} }
} }
} }

View File

@ -72,14 +72,9 @@ namespace test
.AddDbContext<ApplicationDbContext>( .AddDbContext<ApplicationDbContext>(
db => db.UseNpgsql(ConnectionString) db => db.UseNpgsql(ConnectionString)
); );
services.Configure<SharedAuthenticationOptions>(options =>
{
options.SignInScheme = "Bearer";
});
services.AddTransient<Microsoft.Extensions.WebEncoders.UrlEncoder, UrlEncoder>(); services.AddTransient<Microsoft.Extensions.WebEncoders.UrlEncoder, UrlEncoder>();
services.AddAuthentication();
} }