public async Task AddTokenAsync(TokenDescriptor tokenDescriptor, CancellationToken cancellationToken = default) { if (string.IsNullOrWhiteSpace(tokenDescriptor.PrivateKey)) { tokenDescriptor.PrivateKey = _passwordProvider.GetNextStringPassword(ValidationConstants.MaxPasswordLength); } _tokenDescriptorModelValidator.EnsureValidation(tokenDescriptor); await _tokenRepository.AddAsync(tokenDescriptor, cancellationToken); _notifier.Notify(new TokenAddedNotifyMessage(tokenDescriptor)); }