-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAppHost.cs
More file actions
24 lines (22 loc) · 692 Bytes
/
AppHost.cs
File metadata and controls
24 lines (22 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using Funq;
using ServiceStack.Auth;
using ServiceStack.Logging;
namespace ServiceStack.Authentication.Aad.SelfHostTest
{
public class AppHost : AppSelfHostBase
{
public AppHost()
: base("SelfHostTest", typeof(Services).Assembly)
{
Logging.LogManager.LogFactory = new ConsoleLogFactory();
}
public override void Configure(Container container)
{
var authProviders = new IAuthProvider[] { new AadAuthProvider(AppSettings) };
Plugins.Add(new AuthFeature(
() => new AuthUserSession(),
authProviders,
htmlRedirect: "/auth/aad"));
}
}
}