public string GetLogoutResponseUrl(Saml2LogoutResponse logoutResponse, string relayState)
        {
            var signingCertificate = _certificateProvider.GetCertificate();

            var response = _saml2MessageFactory.CreateLogoutResponse(logoutResponse.StatusCode,
                                                                     logoutResponse.OriginalLogoutRequest.ID);

            return(_httpRedirectBinding.BuildLogoutResponseUrl(response,
                                                               signingCertificate.ServiceProvider.PrivateKey, _identityProviderConfiguration.HashingAlgorithm,
                                                               relayState));
        }
Beispiel #2
0
        public Task <string> ReceiveIdpInitiatedLogoutRequest(string providerName)
        {
            var(samlLogoutResponse, isSuccess) = IsLogoutResponseSuccess(providerName);
            if (!isSuccess)
            {
                return(null);
            }

            var relayState = _httpRedirectBinding.GetCompressedRelayState();

            var response = _samlMessageFactory.CreateLogoutResponse(providerName, samlLogoutResponse.StatusCode, samlLogoutResponse.OriginalLogoutRequest.ID);

            return(Task.FromResult(_httpRedirectBinding.BuildLogoutResponseUrl(providerName, response, relayState)));
        }