Esempio n. 1
0
        public async Task <SignInResult> SignIn(string schema, AuthenticationProperties properties, params ClaimsIdentity[] identities)
        {
            SignInResult result     = new SignInResult();
            ForClaims    idenConfig = new ForClaims(_claimsFactory.GetClaims(), ForClaims.ExternalCookie);

            //---加入驗證邏輯---
            if (true)
            {
                await _context.Authentication.SignOutAsync(schema);

                await _context.Authentication.SignInAsync(schema, new ForPrincipal(idenConfig), properties);

                //_context.User = new ForPrincipal(idenConfig);
                result.Succeeded = true;
            }
            else
            {
                result.Succeeded = false;
            }
            return(result);
        }
Esempio n. 2
0
 public ForPrincipal(ForClaims identity)
     : base(identity)
 {
 }