コード例 #1
0
        public async Task <LoginReturnDTO> SignIn(User user)
        {
            try
            {
                var member = await _accessManager.ValidateCredentials(user);

                var token = _accessManager.GenerateToken(member);

                return(new LoginReturnDTO()
                {
                    Name = member.Name,
                    Email = member.Email,
                    Image = member.Image,
                    Adm = member.Adm,
                    Token = token
                });
            }
            catch (Exception ex)
            {
                throw new ArgumentException(ex.Message);
            }
        }