mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-24 01:18:22 +00:00
Updated necessary SAML code after rebasing cooperative cancellation support
This commit is contained in:
parent
3080649747
commit
65afc5d0b1
4 changed files with 11 additions and 8 deletions
|
|
@ -66,7 +66,7 @@ public static class HttpContextExtensions
|
|||
if (currentSubId == logoutMessage.SubjectId)
|
||||
{
|
||||
clientIds = clientIds.Union(await userSession.GetClientListAsync(context.RequestAborted));
|
||||
var currentSamlSessions = await userSession.GetSamlSessionListAsync();
|
||||
var currentSamlSessions = await userSession.GetSamlSessionListAsync(context.RequestAborted);
|
||||
samlSessions = samlSessions.Union(currentSamlSessions).ToList();
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ public static class HttpContextExtensions
|
|||
{
|
||||
// see if current user has any clients they need to signout of
|
||||
var clientIds = await userSession.GetClientListAsync(context.RequestAborted);
|
||||
var samlSessions = await userSession.GetSamlSessionListAsync();
|
||||
var samlSessions = await userSession.GetSamlSessionListAsync(context.RequestAborted);
|
||||
var samlEntityIds = samlSessions.Select(s => s.EntityId);
|
||||
|
||||
if ((clientIds.Any() && await AnyClientHasFrontChannelLogout(clientIds)) ||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ internal class DefaultIdentityServerInteractionService : IIdentityServerInteract
|
|||
if (user != null)
|
||||
{
|
||||
var clientIds = await _userSession.GetClientListAsync(ct);
|
||||
var samlSessions = await _userSession.GetSamlSessionListAsync();
|
||||
var samlSessions = await _userSession.GetSamlSessionListAsync(ct);
|
||||
if (clientIds.Any() || samlSessions.Any())
|
||||
{
|
||||
var sid = await _userSession.GetSessionIdAsync(ct);
|
||||
|
|
|
|||
|
|
@ -68,21 +68,24 @@ public interface IUserSession
|
|||
/// Adds a SAML SP session to the user's session.
|
||||
/// </summary>
|
||||
/// <param name="session">The SAML session data.</param>
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
/// <remarks>
|
||||
/// Session data is stored in AuthenticationProperties. For deployments with many SAML service providers,
|
||||
/// server-side sessions should be enabled to avoid cookie size limitations.
|
||||
/// See <see cref="SamlSpSessionData"/> for details.
|
||||
/// </remarks>
|
||||
Task AddSamlSessionAsync(SamlSpSessionData session);
|
||||
Task AddSamlSessionAsync(SamlSpSessionData session, Ct ct);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of SAML SP sessions for the user's session.
|
||||
/// </summary>
|
||||
Task<IEnumerable<SamlSpSessionData>> GetSamlSessionListAsync();
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task<IEnumerable<SamlSpSessionData>> GetSamlSessionListAsync(Ct ct);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a SAML SP session by EntityId.
|
||||
/// </summary>
|
||||
/// <param name="entityId">The SP's entity ID.</param>
|
||||
Task RemoveSamlSessionAsync(string entityId);
|
||||
/// <param name="ct">The cancellation token.</param>
|
||||
Task RemoveSamlSessionAsync(string entityId, Ct ct);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public class EndSessionRequestValidator : IEndSessionRequestValidator
|
|||
validatedRequest.SessionId = await UserSession.GetSessionIdAsync(ct);
|
||||
validatedRequest.ClientIds = await UserSession.GetClientListAsync(ct);
|
||||
|
||||
var samlSessions = await UserSession.GetSamlSessionListAsync();
|
||||
var samlSessions = await UserSession.GetSamlSessionListAsync(ct);
|
||||
validatedRequest.SamlSessions = samlSessions;
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ public class EndSessionRequestValidator : IEndSessionRequestValidator
|
|||
validatedRequest.SessionId = await UserSession.GetSessionIdAsync(ct);
|
||||
validatedRequest.ClientIds = await UserSession.GetClientListAsync(ct);
|
||||
|
||||
var samlSessions = await UserSession.GetSamlSessionListAsync();
|
||||
var samlSessions = await UserSession.GetSamlSessionListAsync(ct);
|
||||
validatedRequest.SamlSessions = samlSessions;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue