Esempio n. 1
0
        public bool IsValid(Uri redirectUri)
        {
            if (redirectUri == null)
            {
                return(false);
            }

            var redirectWithHost = GetUriWithHost(redirectUri);
            var appBaseUri       = baseUriProvider.GetBaseUri();

            return(appBaseUri.IsBaseOf(redirectWithHost));
        }
Esempio n. 2
0
        public Uri GetEditTicketUri(TicketReference reference)
        {
            if (reference == null)
            {
                return(null);
            }
            var uriString = helper.Action(nameof(TicketController.Edit),
                                          typeof(TicketController).AsControllerName(),
                                          new { id = reference });

            logger.DebugFormat("Edit ticket URL:{0}", uriString);
            return(new Uri(baseUriProvider.GetBaseUri(), uriString));
        }
Esempio n. 3
0
        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
            var viewResult = filterContext.Result as ViewResult;

            if (viewResult == null)
            {
                return;
            }

            viewResult.ViewBag.BaseUri = new BaseUriModel {
                Uri = baseUriProvider.GetBaseUri()
            };
        }