Exemplo n.º 1
0
 public SSOAuthUtil(ObjCacheProvider <UserAuthSession> objCacheProvider
                    , UserManagerApp userManager
                    , AppInfoService infoService)
 {
     _objCacheProvider = objCacheProvider;
     _userManager      = userManager;
     _appInfoService   = infoService;
 }
Exemplo n.º 2
0
 public LocalAuth(IOptions <AppSetting> appConfiguration
                  , IHttpContextAccessor httpContextAccessor
                  , AuthorizeApp app
                  , LoginParse loginParse
                  , ObjCacheProvider <UserAuthSession> objCacheProvider)
 {
     _appConfiguration    = appConfiguration;
     _httpContextAccessor = httpContextAccessor;
     _app              = app;
     _loginParse       = loginParse;
     _objCacheProvider = objCacheProvider;
 }
Exemplo n.º 3
0
        public ActionResult LogOff()
        {
            ObjCacheProvider <UserAuthSession> objCacheProvider = new ObjCacheProvider <UserAuthSession>();
            string token = string.Empty;

            //Token by QueryString

            if (HttpContext.Request.Cookies[ConstCommon.Token] != null)  //从Cookie读取Token
            {
                token = HttpContext.Request.Cookies[ConstCommon.Token].Value;
            }

            UserAuthSession userSession = objCacheProvider.GetCache(token);

            if (userSession != null && string.IsNullOrEmpty(userSession.Token))
            {
                objCacheProvider.Remove(userSession.Token);
            }
            return(new RedirectResult("/Admin/Account/Login"));
        }
Exemplo n.º 4
0
 public CheckController(AuthorizeApp app, ObjCacheProvider <UserAuthSession> objCacheProvider, LoginParse loginParse)
 {
     _app = app;
     _objCacheProvider = objCacheProvider;
     _loginParse       = loginParse;
 }
Exemplo n.º 5
0
 public LoginParse(ObjCacheProvider <UserAuthSession> objCacheProvider
                   , AppInfoService infoService)
 {
     _objCacheProvider = objCacheProvider;
     _appInfoService   = infoService;
 }
Exemplo n.º 6
0
 public CheckController(AuthorizeApp app, ObjCacheProvider <UserAuthSession> objCacheProvider, SSOAuthUtil ssoAuthUtil)
 {
     _app = app;
     _objCacheProvider = objCacheProvider;
     _ssoAuthUtil      = ssoAuthUtil;
 }