diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38d2fd7..80d3897 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Nothing yet.
+## [3.0.4] - 2024-12-27
+
+### Fixed
+
+- Session ID on user `SignIn` method.
+
## [3.0.3] - 2024-12-27
### Fixed
@@ -61,7 +67,8 @@ Nothing yet.
- Relational storage (PostgreSQL and Microsoft SQL Server) for Identity entities.
- Unit and Integration tests.
-[unreleased]: https://github.com/Logitar/Identity/compare/v3.0.3...HEAD
+[unreleased]: https://github.com/Logitar/Identity/compare/v3.0.4...HEAD
+[3.0.4]: https://github.com/Logitar/Identity/compare/v3.0.3...v3.0.4
[3.0.3]: https://github.com/Logitar/Identity/compare/v3.0.2...v3.0.3
[3.0.2]: https://github.com/Logitar/Identity/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/Logitar/Identity/compare/v3.0.0...v3.0.1
diff --git a/lib/Logitar.Identity.Contracts/Logitar.Identity.Contracts.csproj b/lib/Logitar.Identity.Contracts/Logitar.Identity.Contracts.csproj
index 8adadc5..798699a 100644
--- a/lib/Logitar.Identity.Contracts/Logitar.Identity.Contracts.csproj
+++ b/lib/Logitar.Identity.Contracts/Logitar.Identity.Contracts.csproj
@@ -15,14 +15,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
True
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;contracts
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.Contracts
diff --git a/lib/Logitar.Identity.Core/Logitar.Identity.Core.csproj b/lib/Logitar.Identity.Core/Logitar.Identity.Core.csproj
index 4c8ac81..985ebec 100644
--- a/lib/Logitar.Identity.Core/Logitar.Identity.Core.csproj
+++ b/lib/Logitar.Identity.Core/Logitar.Identity.Core.csproj
@@ -14,14 +14,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
True
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;domain
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.Core
diff --git a/lib/Logitar.Identity.Core/Users/User.cs b/lib/Logitar.Identity.Core/Users/User.cs
index 71be584..102e7d0 100644
--- a/lib/Logitar.Identity.Core/Users/User.cs
+++ b/lib/Logitar.Identity.Core/Users/User.cs
@@ -771,14 +771,14 @@ protected virtual void Handle(UserUniqueNameChanged @event)
///
/// The secret of the session.
/// (Optional) The actor identifier. This parameter should be left null so that it defaults to the user's identifier.
- /// The identifier of the session.
+ /// The identifier of the session.
/// The newly opened session.
/// The password is incorrect.
/// The user has no password.
/// The user is disabled.
- public Session SignIn(Password? secret = null, ActorId? actorId = null, SessionId? sessionId = null)
+ public Session SignIn(Password? secret = null, ActorId? actorId = null, EntityId? entityId = null)
{
- return SignIn(password: null, secret, actorId, sessionId);
+ return SignIn(password: null, secret, actorId, entityId);
}
///
/// Signs-in the user, opening a new session.
@@ -786,12 +786,12 @@ public Session SignIn(Password? secret = null, ActorId? actorId = null, SessionI
/// The password to check.
/// The secret of the session.
/// (Optional) The actor identifier. This parameter should be left null so that it defaults to the user's identifier.
- /// The identifier of the session.
+ /// The identifier of the session.
/// The newly opened session.
/// The password is incorrect.
/// The user has no password.
/// The user is disabled.
- public Session SignIn(string? password, Password? secret = null, ActorId? actorId = null, SessionId? sessionId = null)
+ public Session SignIn(string? password, Password? secret = null, ActorId? actorId = null, EntityId? entityId = null)
{
if (IsDisabled)
{
@@ -810,6 +810,7 @@ public Session SignIn(string? password, Password? secret = null, ActorId? actorI
}
actorId ??= new(Id.Value);
+ SessionId sessionId = entityId.HasValue ? new SessionId(TenantId, entityId.Value) : SessionId.NewId(TenantId);
Session session = new(this, secret, actorId, sessionId);
Raise(new UserSignedIn(session.CreatedOn), actorId.Value);
diff --git a/lib/Logitar.Identity.EntityFrameworkCore.PostgreSQL/Logitar.Identity.EntityFrameworkCore.PostgreSQL.csproj b/lib/Logitar.Identity.EntityFrameworkCore.PostgreSQL/Logitar.Identity.EntityFrameworkCore.PostgreSQL.csproj
index 809b795..5ee801e 100644
--- a/lib/Logitar.Identity.EntityFrameworkCore.PostgreSQL/Logitar.Identity.EntityFrameworkCore.PostgreSQL.csproj
+++ b/lib/Logitar.Identity.EntityFrameworkCore.PostgreSQL/Logitar.Identity.EntityFrameworkCore.PostgreSQL.csproj
@@ -15,14 +15,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
False
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;entityframeworkcore;postgres
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.EntityFrameworkCore.PostgreSQL
diff --git a/lib/Logitar.Identity.EntityFrameworkCore.Relational/Logitar.Identity.EntityFrameworkCore.Relational.csproj b/lib/Logitar.Identity.EntityFrameworkCore.Relational/Logitar.Identity.EntityFrameworkCore.Relational.csproj
index 9843259..3526fa9 100644
--- a/lib/Logitar.Identity.EntityFrameworkCore.Relational/Logitar.Identity.EntityFrameworkCore.Relational.csproj
+++ b/lib/Logitar.Identity.EntityFrameworkCore.Relational/Logitar.Identity.EntityFrameworkCore.Relational.csproj
@@ -15,14 +15,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
False
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;entityframeworkcore;relational
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.EntityFrameworkCore.Relational
diff --git a/lib/Logitar.Identity.EntityFrameworkCore.SqlServer/Logitar.Identity.EntityFrameworkCore.SqlServer.csproj b/lib/Logitar.Identity.EntityFrameworkCore.SqlServer/Logitar.Identity.EntityFrameworkCore.SqlServer.csproj
index 290ac5a..0d86d45 100644
--- a/lib/Logitar.Identity.EntityFrameworkCore.SqlServer/Logitar.Identity.EntityFrameworkCore.SqlServer.csproj
+++ b/lib/Logitar.Identity.EntityFrameworkCore.SqlServer/Logitar.Identity.EntityFrameworkCore.SqlServer.csproj
@@ -15,14 +15,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
False
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;entityframeworkcore;sqlserver
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.EntityFrameworkCore.SqlServer
diff --git a/lib/Logitar.Identity.Infrastructure/Logitar.Identity.Infrastructure.csproj b/lib/Logitar.Identity.Infrastructure/Logitar.Identity.Infrastructure.csproj
index 8e0b350..16a581b 100644
--- a/lib/Logitar.Identity.Infrastructure/Logitar.Identity.Infrastructure.csproj
+++ b/lib/Logitar.Identity.Infrastructure/Logitar.Identity.Infrastructure.csproj
@@ -15,14 +15,14 @@
README.md
https://github.com/Logitar/Identity
git
- 3.0.3.0
+ 3.0.4.0
$(AssemblyVersion)
LICENSE
True
- 3.0.3
+ 3.0.4
en-CA
False
- Fixed Dependency Injection.
+ Fixed Session ID on User.SignIn method.
logitar;net;framework;identity;infrastructure
https://github.com/Logitar/Identity/tree/main/lib/Logitar.Identity.Infrastructure