Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a typo. #71

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/ApiKeys/ApiKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Logitar.Identity.Core.ApiKeys;

/// <summary>
/// Represents an API key in the identity system. Similarly to an user, it can have access to processes and resources using roles.
/// Represents an API key in the identity system. Similarly to a user, it can have access to processes and resources using roles.
/// It should be used instead of users for backend-to-backend authentication where personal and authentication information are not required.
/// </summary>
public class ApiKey : AggregateRoot
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Sessions/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Logitar.Identity.Core.Sessions;

/// <summary>
/// Represents a session in the identity system. A session allows an user to perform actions in a timeframe.
/// Represents a session in the identity system. A session allows a user to perform actions in a timeframe.
/// It can be signed-out to close the timeframe, or renewed to extend the timeframe.
/// </summary>
public class Session : AggregateRoot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the postal address of an user is updated.
/// The event raised when the postal address of a user is updated.
/// </summary>
public record UserAddressChanged : DomainEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user is authenticated.
/// The event raised when a user is authenticated.
/// </summary>
public record UserAuthenticated : DomainEvent, INotification;
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserDeleted.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user is deleted.
/// The event raised when a user is deleted.
/// </summary>
public record UserDeleted : DomainEvent, IDeleteEvent, INotification;
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserDisabled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user is disabled.
/// The event raised when a user is disabled.
/// </summary>
public record UserDisabled : DomainEvent, INotification;
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserEmailChanged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the email address of an user is updated.
/// The event raised when the email address of a user is updated.
/// </summary>
public record UserEmailChanged : DomainEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserEnabled.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user is enabled.
/// The event raised when a user is enabled.
/// </summary>
public record UserEnabled : DomainEvent, INotification;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when a custom identifier is added to an user, or updated.
/// The event raised when a custom identifier is added to a user, or updated.
/// </summary>
public record UserIdentifierChanged : DomainEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when a custom identifier is removed from an user.
/// The event raised when a custom identifier is removed from a user.
/// </summary>
public record UserIdentifierRemoved : DomainEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user changes its password.
/// The event raised when a user changes its password.
/// </summary>
public record UserPasswordChanged : UserPasswordEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the password of an user is removed.
/// The event raised when the password of a user is removed.
/// </summary>
public record UserPasswordRemoved : DomainEvent, INotification;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user resets its password.
/// The event raised when a user resets its password.
/// </summary>
public record UserPasswordReset : UserPasswordEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the password of an user is modified.
/// The event raised when the password of a user is modified.
/// </summary>
public record UserPasswordUpdated : UserPasswordEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserPhoneChanged.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the phone number of an user is updated.
/// The event raised when the phone number of a user is updated.
/// </summary>
public record UserPhoneChanged : DomainEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserRoleAdded.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when a role is added to an user.
/// The event raised when a role is added to a user.
/// </summary>
public record UserRoleAdded : DomainEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserRoleRemoved.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when a role is removed from an user.
/// The event raised when a role is removed from a user.
/// </summary>
public record UserRoleRemoved : DomainEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/Events/UserSignedIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when an user signs-in.
/// The event raised when a user signs-in.
/// </summary>
public record UserSignedIn : DomainEvent, INotification
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Logitar.Identity.Core.Users.Events;

/// <summary>
/// The event raised when the unique name of an user is changed.
/// The event raised when the unique name of a user is changed.
/// </summary>
public record UserUniqueNameChanged : DomainEvent, INotification
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/FoundUsers.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Logitar.Identity.Core.Users;

/// <summary>
/// The results of an user search.
/// The results of a user search.
/// </summary>
public record FoundUsers
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Logitar.Identity.Core/Users/IUserManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace Logitar.Identity.Core.Users;
public interface IUserManager
{
/// <summary>
/// Tries finding an user by its unique identifier, unique name, or email address if they are unique.
/// Tries finding a user by its unique identifier, unique name, or email address if they are unique.
/// </summary>
/// <param name="tenantId">The identifier of the tenant in which to search.</param>
/// <param name="id">The identifier of the user to find.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The found users.</returns>
Task<FoundUsers> FindAsync(string? tenantId, string id, CancellationToken cancellationToken = default);
/// <summary>
/// Tries finding an user by its unique identifier, unique name, or email address if they are unique.
/// Tries finding a user by its unique identifier, unique name, or email address if they are unique.
/// </summary>
/// <param name="tenantId">The identifier of the tenant in which to search.</param>
/// <param name="id">The identifier of the user to find.</param>
Expand Down
12 changes: 6 additions & 6 deletions lib/Logitar.Identity.Core/Users/IUserRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ namespace Logitar.Identity.Core.Users;
public interface IUserRepository
{
/// <summary>
/// Loads an user by the specified unique identifier.
/// Loads a user by the specified unique identifier.
/// </summary>
/// <param name="id">The unique identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The user, if found.</returns>
Task<User?> LoadAsync(UserId id, CancellationToken cancellationToken = default);
/// <summary>
/// Loads an user by the specified unique identifier.
/// Loads a user by the specified unique identifier.
/// </summary>
/// <param name="id">The unique identifier.</param>
/// <param name="version">The version at which to load the user.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The user, if found.</returns>
Task<User?> LoadAsync(UserId id, long? version, CancellationToken cancellationToken = default);
/// <summary>
/// Loads an user by the specified unique identifier.
/// Loads a user by the specified unique identifier.
/// </summary>
/// <param name="id">The unique identifier.</param>
/// <param name="isDeleted">A value indicating whether or not to load the user if it is deleted.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>The user, if found.</returns>
Task<User?> LoadAsync(UserId id, bool? isDeleted, CancellationToken cancellationToken = default);
/// <summary>
/// Loads an user by the specified unique identifier.
/// Loads a user by the specified unique identifier.
/// </summary>
/// <param name="id">The unique identifier.</param>
/// <param name="version">The version at which to load the user.</param>
Expand Down Expand Up @@ -80,7 +80,7 @@ public interface IUserRepository
Task<IReadOnlyCollection<User>> LoadAsync(TenantId? tenantId, CancellationToken cancellationToken = default);

/// <summary>
/// Loads an user by the specified unique name.
/// Loads a user by the specified unique name.
/// </summary>
/// <param name="tenantId">The identifier of the tenant.</param>
/// <param name="uniqueName">The unique name.</param>
Expand All @@ -96,7 +96,7 @@ public interface IUserRepository
/// <returns>The found users.</returns>
Task<IReadOnlyCollection<User>> LoadAsync(TenantId? tenantId, Email email, CancellationToken cancellationToken = default);
/// <summary>
/// Loads an user by the specified custom identifier.
/// Loads a user by the specified custom identifier.
/// </summary>
/// <param name="tenantId">The identifier of the tenant.</param>
/// <param name="identifierKey">The key of the custom identifier.</param>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Logitar.Identity.Core.Users;

/// <summary>
/// The exception raised when an user password check fails.
/// The exception raised when a user password check fails.
/// </summary>
public class IncorrectUserPasswordException : InvalidCredentialsException
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace Logitar.Identity.Core.Users;

/// <summary>
/// Represents an user in the identity system. An user generally represents the account of a person.
/// Represents a user in the identity system. A user generally represents the account of a person.
/// It contains personal information about that person as well as authentication information that could be used to authenticate that person.
/// </summary>
public class User : AggregateRoot
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Logitar.Identity.Core.Users;

/// <summary>
/// The exception raised when handling an user without a password.
/// The exception raised when handling a user without a password.
/// </summary>
public class UserHasNoPasswordException : InvalidCredentialsException
{
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Users/UserId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Logitar.Identity.Core.Users;

/// <summary>
/// Represents the identifier of an user.
/// Represents the identifier of a user.
/// </summary>
public readonly struct UserId
{
Expand Down
4 changes: 2 additions & 2 deletions lib/Logitar.Identity.Core/Users/UserManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public UserManager(ISessionRepository sessionRepository, IUserRepository userRep
}

/// <summary>
/// Tries finding an user by its unique identifier, unique name, or email address if they are unique.
/// Tries finding a user by its unique identifier, unique name, or email address if they are unique.
/// </summary>
/// <param name="tenantIdValue">The identifier of the tenant in which to search.</param>
/// <param name="id">The identifier of the user to find.</param>
Expand All @@ -49,7 +49,7 @@ public virtual async Task<FoundUsers> FindAsync(string? tenantIdValue, string id
return await FindAsync(tenantIdValue, id, userSettings: null, cancellationToken);
}
/// <summary>
/// Tries finding an user by its unique identifier, unique name, or email address if they are unique.
/// Tries finding a user by its unique identifier, unique name, or email address if they are unique.
/// </summary>
/// <param name="tenantIdValue">The identifier of the tenant in which to search.</param>
/// <param name="id">The identifier of the user to find.</param>
Expand Down
2 changes: 1 addition & 1 deletion lib/Logitar.Identity.Core/Validators/LocaleValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class LocaleValidator<T> : IPropertyValidator<T, string>
/// <returns>The default error message template.</returns>
public string GetDefaultMessageTemplate(string errorCode)
{
return "'{PropertyName}' must be a valid locale code. It cannot be the invariant culture, nor an user-defined culture.";
return "'{PropertyName}' must be a valid locale code. It cannot be the invariant culture, nor a user-defined culture.";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public UserManagerTests()
_userManager = new(_sessionRepository.Object, _userRepository.Object, _userSettingsResolver.Object);
}

[Fact(DisplayName = "FindAsync: it should find an user by email address.")]
[Fact(DisplayName = "FindAsync: it should find a user by email address.")]
public async Task FindAsync_it_should_find_an_user_by_email_address()
{
_userSettings.RequireUniqueEmail = true;
Expand All @@ -52,7 +52,7 @@ public async Task FindAsync_it_should_find_an_user_by_email_address()
_userRepository.Verify(x => x.LoadAsync(tenantId, user.Email, _cancellationToken), Times.Once);
}

[Fact(DisplayName = "FindAsync: it should find an user by ID.")]
[Fact(DisplayName = "FindAsync: it should find a user by ID.")]
public async Task FindAsync_it_should_find_an_user_by_Id()
{
User user = new(new UniqueName(_userSettings.UniqueName, _faker.Person.UserName));
Expand All @@ -68,7 +68,7 @@ public async Task FindAsync_it_should_find_an_user_by_Id()
_userRepository.Verify(x => x.LoadAsync(It.IsAny<TenantId>(), It.IsAny<Email>(), _cancellationToken), Times.Never);
}

[Fact(DisplayName = "FindAsync: it should find an user by unique name.")]
[Fact(DisplayName = "FindAsync: it should find a user by unique name.")]
public async Task FindAsync_it_should_find_an_user_by_unique_name()
{
TenantId tenantId = new("tests");
Expand All @@ -85,7 +85,7 @@ public async Task FindAsync_it_should_find_an_user_by_unique_name()
_userRepository.Verify(x => x.LoadAsync(It.IsAny<TenantId>(), It.IsAny<Email>(), _cancellationToken), Times.Never);
}

[Fact(DisplayName = "FindAsync: it should not find an user by email address when many are found.")]
[Fact(DisplayName = "FindAsync: it should not find a user by email address when many are found.")]
public async Task FindAsync_it_should_not_find_an_user_by_email_address_when_many_are_found()
{
_userSettings.RequireUniqueEmail = true;
Expand Down
Loading