コード例 #1
0
        public Task <ISignIn> CreateAsync(ClaimsPrincipal claimsPrincipal)
        {
            var id = _signInManager.GetUserId(claimsPrincipal);

            if (id != null)
            {
                var name = _signInManager.GetUserName(claimsPrincipal);
                return(Task.FromResult <ISignIn>(new SignIn(id, name)));
            }

            return(Task.FromResult <ISignIn>(null));
        }