internal EndSessionCallbackResult( EndSessionCallbackValidationResult result, IdentityServerOptions options) : this(result) { _options = options; }
public EndSessionCallbackResultTests() { _validationResult = new EndSessionCallbackValidationResult() { IsError = false, }; _options = new IdentityServerOptions(); _subject = new EndSessionCallbackResult(_validationResult, _options); }
public EndSessionCallbackResult(EndSessionCallbackValidationResult result) { if (result == null) { throw new ArgumentNullException(nameof(result)); } _result = result; }
internal EndSessionCallbackResult( EndSessionCallbackValidationResult result, IdentityServerOptions options, BackChannelLogoutClient backChannelClient) : this(result) { _options = options; _backChannelClient = backChannelClient; }
internal EndSessionCallbackResult( EndSessionCallbackValidationResult result, IClientSessionService clientList, IMessageStore <LogoutMessage> logoutMessageStore, IdentityServerOptions options) : this(result) { _clientList = clientList; _logoutMessageStore = logoutMessageStore; _options = options; }
private async Task InvokeBackChannelClientsAsync(EndSessionCallbackValidationResult result) { if (result.BackChannelLogouts?.Any() == true) { // best-effort, and async to not block the response to the browser try { await _backChannelClient.SendLogoutsAsync(result.BackChannelLogouts); } catch (Exception ex) { _logger.LogError(ex, "Error calling backchannel sign-out urls"); } } }
/// <inheritdoc /> public async Task <EndSessionCallbackValidationResult> ValidateCallbackAsync(NameValueCollection parameters) { var result = new EndSessionCallbackValidationResult { IsError = true }; var endSessionId = parameters[Constants.UIConstants.DefaultRoutePathParams.EndSessionCallback]; var endSessionMessage = await EndSessionMessageStore.ReadAsync(endSessionId); if (endSessionMessage?.Data?.ClientIds?.Any() == true) { result.IsError = false; result.FrontChannelLogoutUrls = await LogoutNotificationService.GetFrontChannelLogoutNotificationsUrlsAsync(endSessionMessage.Data); } else { result.Error = "Failed to read end session callback message"; } return(result); }