Ejemplo n.º 1
0
        /// <inheritdoc/>
        public Task <IUserCredentials> ChangePasswordAsync(
            string userId,
            ChangePasswordOptions options,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var changePasswordRequest = new ChangePasswordRequest
            {
                OldPassword = new PasswordCredential {
                    Value = options.CurrentPassword
                },
                NewPassword = new PasswordCredential {
                    Value = options.NewPassword
                },
            };

            return(ChangePasswordAsync(changePasswordRequest, userId, cancellationToken));
        }
Ejemplo n.º 2
0
 /// <inheritdoc/>
 public Task <IUserCredentials> ChangePasswordAsync(ChangePasswordOptions options, CancellationToken cancellationToken = default(CancellationToken))
 => GetClient().Users.ChangePasswordAsync(Id, options, cancellationToken);