Пример #1
0
        public async Task <IActionResult> InitiateSingleLogout(string returnUrl = null)
        {
            // Request logout at the service provider(s).
            await _samlIdentityProvider.InitiateSloAsync(relayState : returnUrl);

            return(new EmptyResult());
        }
Пример #2
0
        public async Task <IActionResult> InitiateSingleLogout(string returnUrl = "/Logout")
        {
            // request log out to SP
            await _samlIdentityProvider.InitiateSloAsync(relayState : returnUrl);

            return(new EmptyResult());
        }
Пример #3
0
        public async Task <IActionResult> Logout()
        {
            await _signInManager.SignOutAsync();

            _logger.LogInformation("User logged out.");

            var ssoState = await _samlIdentityProvider.GetStatusAsync();

            if (await ssoState.CanSloAsync())
            {
                // Request logout at the service providers.
                await _samlIdentityProvider.InitiateSloAsync();

                return(new EmptyResult());
            }

            return(RedirectToPage("/Index"));
        }