dennis-garavsky
/
XAF_how-to-use-google-facebook-and-microsoft-accounts-in-aspnet-xaf-applications-oauth2-demo-t535280
Public
forked from DevExpress-Examples/xaf-web-forms-use-oauth2-authentication-providers
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CustomSecurityStrategyComplex.cs
25 lines (24 loc) · 928 Bytes
/
CustomSecurityStrategyComplex.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Security;
namespace AuthenticationOwin.Module.Web.Security {
public class CustomSecurityStrategyComplex : SecurityStrategyComplex {
protected override void InitializeNewUserCore(IObjectSpace objectSpace, object user) {
base.InitializeNewUserCore(objectSpace, user);
}
public void InitializeNewUser(IObjectSpace objectSpace, object user) {
InitializeNewUserCore(objectSpace, user);
}
public override void Logoff() {
if(HttpContext.Current.Request.Cookies[".AspNet.External"] != null) {
HttpContext.Current.Response.Cookies[".AspNet.External"].Expires = DateTime.Now.AddDays(-1);
}
base.Logoff();
}
}
}