Пример #1
0
        public string PerformAuthentication(IdentityUser identityUser,
                                            string loginUserName, string loginPassword,
                                            string jwKey, string jwIssuer)
        {
            Notification notification = ValidateAuthentication(identityUser, loginUserName, loginPassword);

            if (notification.HasErrors())
            {
                throw new ArgumentException(notification.ErrorMessage());
            }

            return(identityUser.BuildToken(jwKey, jwIssuer));
        }