Beispiel #1
0
            public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
            {
                if (action == SequenceAction.Start)
                {
                    await sequenceLogic.StartSequenceAsync(true);
                }
                else if (!context.HttpContext.Items.ContainsKey(Constants.Sequence.Start) && !context.HttpContext.Items.ContainsKey(Constants.Sequence.Valid))
                {
                    var sequenceString = context.HttpContext.GetRouteSequenceString();
                    await sequenceLogic.ValidateSequenceAsync(sequenceString, true);
                }

                await next();
            }
Beispiel #2
0
        public async Task <IActionResult> SingleLogout()
        {
            try
            {
                var genericHttpRequest = Request.ToGenericHttpRequest();
                if (new Saml2PostBinding().IsResponse(genericHttpRequest) || new Saml2RedirectBinding().IsResponse(genericHttpRequest))
                {
                    return(await LoggedOutInternal());
                }
                else
                {
                    await sequenceLogic.StartSequenceAsync(true);

                    return(await SingleLogoutInternal());
                }
            }
            catch (Exception ex)
            {
                throw new EndpointException($"SAML Logged Out response or Single Logout request failed, Name '{RouteBinding.UpParty.Name}'.", ex)
                      {
                          RouteBinding = RouteBinding
                      };
            }
        }