private void ConfigureAuth(Container container)
{
Plugins.Add(new AuthFeature(() => new AuthUserSession(),
new IAuthProvider[]
{
new BasicAuthProvider(AppSettings),
new ApiKeyAuthProvider(AppSettings),
})
{
ServiceRoutes = new Dictionary<Type, string[]> {
{ typeof(AuthenticateService), new[] { "/api/auth", "/api/auth/{provider}" } },
}
});
var authRepo = new OrmLiteAuthRepository(container.Resolve<IDbConnectionFactory>());
container.Register<IAuthRepository>(c => authRepo);
authRepo.InitSchema();
}