public async Task SignOutAsync(AuthenticationProperties properties) { _logger.LogDebug($"Entering {nameof(SignOutAsync)}", properties); var logoutRequestId = CreateUniqueId(); properties ??= new AuthenticationProperties(); properties.Items.Add(LogoutRequestIdKey, logoutRequestId); properties.Items.Add(nameof(Options.SignOutScheme), Options.SignOutScheme); await _sessionStore.SaveAsync <AuthenticationProperties>(properties); await _samlService.InitiateSloAsync(Options.IdentityProviderName, logoutRequestId); }
public async Task SignOutAsync(AuthenticationProperties properties) { _logger.LogDebug($"Entering {nameof(SignOutAsync)}", properties); var logoutRequestId = CreateUniqueId(); properties = properties ?? new AuthenticationProperties(); properties.Items.Add(LogoutRequestIdKey, logoutRequestId); await _sessionStore.SaveAsync <AuthenticationProperties>(properties); var sessionIndex = Context.User.GetSessionIndex(); var subject = Context.User.GetSubject(); var logoutRequestUrl = _samlService.GetLogoutRequest(logoutRequestId, sessionIndex, subject, null); _logger.LogDebug( $"Method={nameof(SignOutAsync)}. Redirecting to saml identity provider for SLO. Url={logoutRequestUrl}"); Context.Response.Redirect(logoutRequestUrl, true); }