BrockAllen.MembershipReboot.Owin.OwinAuthenticationService.IssueCookie C# (CSharp) Метод

IssueCookie() приватный Метод

private IssueCookie ( IEnumerable enumerable, string authType, System.TimeSpan tokenLifetime, bool persistentCookie ) : void
enumerable IEnumerable
authType string
tokenLifetime System.TimeSpan
persistentCookie bool
Результат void
        private void IssueCookie(IEnumerable<Claim> enumerable, string authType, TimeSpan? tokenLifetime, bool? persistentCookie)
        {
            SignOut();

            var props = new AuthenticationProperties();
            if (tokenLifetime.HasValue) props.ExpiresUtc = DateTime.UtcNow.Add(tokenLifetime.Value);
            if (persistentCookie.HasValue) props.IsPersistent = persistentCookie.Value;

            var id = new ClaimsIdentity(enumerable, authType);

            context.Authentication.SignIn(props, id);
        }