@@ -8,6 +8,12 @@ namespace CodeBeam.UltimateAuth.Core.Abstractions
88 /// </summary>
99 public interface ISessionStoreKernel < TUserId >
1010 {
11+ /// <summary>
12+ /// Executes multiple store operations as a single atomic unit.
13+ /// Implementations must ensure transactional consistency where supported.
14+ /// </summary>
15+ Task ExecuteAsync ( Func < Task > action ) ;
16+
1117 /// <summary>
1218 /// Retrieves a session by its identifier within the given tenant context.
1319 /// </summary>
@@ -31,7 +37,7 @@ public interface ISessionStoreKernel<TUserId>
3137 /// <param name="tenantId">The tenant identifier, or <c>null</c>.</param>
3238 /// <param name="sessionId">The session identifier.</param>
3339 /// <param name="at">The UTC timestamp of revocation.</param>
34- Task RevokeSessionAsync ( string ? tenantId , AuthSessionId sessionId , DateTime at ) ;
40+ Task RevokeSessionAsync ( string ? tenantId , AuthSessionId sessionId , DateTimeOffset at ) ;
3541
3642 /// <summary>
3743 /// Returns all sessions belonging to the specified chain, ordered according to store implementation rules.
@@ -62,7 +68,7 @@ public interface ISessionStoreKernel<TUserId>
6268 /// <param name="tenantId">The tenant identifier, or <c>null</c>.</param>
6369 /// <param name="chainId">The chain to revoke.</param>
6470 /// <param name="at">The UTC timestamp of revocation.</param>
65- Task RevokeChainAsync ( string ? tenantId , ChainId chainId , DateTime at ) ;
71+ Task RevokeChainAsync ( string ? tenantId , ChainId chainId , DateTimeOffset at ) ;
6672
6773 /// <summary>
6874 /// Retrieves the active session identifier for the specified chain.
@@ -112,14 +118,14 @@ public interface ISessionStoreKernel<TUserId>
112118 /// <param name="tenantId">The tenant identifier, or <c>null</c>.</param>
113119 /// <param name="userId">The user whose root should be revoked.</param>
114120 /// <param name="at">The UTC timestamp of revocation.</param>
115- Task RevokeSessionRootAsync ( string ? tenantId , TUserId userId , DateTime at ) ;
121+ Task RevokeSessionRootAsync ( string ? tenantId , TUserId userId , DateTimeOffset at ) ;
116122
117123 /// <summary>
118124 /// Removes expired sessions from the store while leaving chains and session roots intact. Cleanup strategy is determined by the store implementation.
119125 /// </summary>
120126 /// <param name="tenantId">The tenant identifier, or <c>null</c>.</param>
121127 /// <param name="now">The current UTC timestamp.</param>
122- Task DeleteExpiredSessionsAsync ( string ? tenantId , DateTime now ) ;
128+ Task DeleteExpiredSessionsAsync ( string ? tenantId , DateTimeOffset at ) ;
123129
124130 /// <summary>
125131 /// Retrieves the chain identifier associated with the specified session.
@@ -128,11 +134,5 @@ public interface ISessionStoreKernel<TUserId>
128134 /// <param name="sessionId">The session identifier.</param>
129135 /// <returns>The chain identifier or <c>null</c>.</returns>
130136 Task < ChainId ? > GetChainIdBySessionAsync ( string ? tenantId , AuthSessionId sessionId ) ;
131-
132- /// <summary>
133- /// Executes multiple store operations as a single atomic unit.
134- /// Implementations must ensure transactional consistency where supported.
135- /// </summary>
136- Task ExecuteAsync ( Func < Task > action ) ;
137137 }
138138}
0 commit comments