/// <summary> /// Evaluates this request via any request evaluator callback or an IRequestEvaluator. /// </summary> /// <param name="context"></param> /// <param name="evaluatorCallback">A callback to a custom request evaluator.</param> /// <returns></returns> private RequestSecurity EvaluateRequestViaCallbackOrEvaluator(HttpContextBase context, RequestEvaluatorCallback evaluatorCallback) { RequestSecurity?evaluatorSecurity = null; if (evaluatorCallback != null) { evaluatorSecurity = evaluatorCallback(context); } RequestSecurity expectedSecurity; if (evaluatorSecurity.HasValue) { // Use the value returned by the EvaluateRequest event. Logger.Log("Using the expected security value provided by the RequestEvaluatorCallback.", Logger.LogLevel.Info); expectedSecurity = evaluatorSecurity.Value; } else { // Evaluate this request with the configured settings, if necessary. IRequestEvaluator requestEvaluator = RequestEvaluatorFactory.Instance.Create(context); expectedSecurity = requestEvaluator.Evaluate(context.Request, _settings); } return(expectedSecurity); }
public CASClient( ShellSettings settings, ITicketValidatorFactory ticketValidatorFactory, IRequestEvaluator requestEvaluator, IClock clock, IUrlUtil urlUtil, IAuthenticationService authenticationService, ICasServices casServices) { _settings = settings; _ticketValidatorFactory = ticketValidatorFactory; _requestEvaluator = requestEvaluator; _clock = clock; _urlUtil = urlUtil; _authenticationService = authenticationService; _casServices = casServices; _xmlNamespaceManager = new XmlNamespaceManager(_xmlNameTable); _xmlNamespaceManager.AddNamespace("cas", "http://www.yale.edu/tp/cas"); _xmlNamespaceManager.AddNamespace("saml", "urn: oasis:names:tc:SAML:1.0:assertion"); _xmlNamespaceManager.AddNamespace("saml2", "urn: oasis:names:tc:SAML:1.0:assertion"); _xmlNamespaceManager.AddNamespace("samlp", "urn: oasis:names:tc:SAML:1.0:protocol"); Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public CasMvcActionFilter( IRequestEvaluator requestEvaluator, ICasServices casServices, ICASActionFilter casActionFilter) { _requestEvaluator = requestEvaluator; _casServices = casServices; _casActionFilter = casActionFilter; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public CasAuthorizationFilter( ICASClient casClient, ICasServices casServices, IRequestEvaluator requestEvaluator) { _casClient = casClient; _casServices = casServices; _requestEvaluator = requestEvaluator; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public CasWebApiActionFilter( IRequestEvaluator requestEvaluator, ICasServices casServices, ICASActionFilter casActionFilter) { _requestEvaluator = requestEvaluator; _casServices = casServices; _casActionFilter = casActionFilter; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public CasActionFilter(IServiceTicketManagerWrapper serviceTicketManagerWrapper, IProxyTicketManagerWrapper proxyTicketManagerWrapper, ICASClient casClient, IRequestEvaluator requestEvaluator, ICasServices casServices) { _serviceTicketManagerWrapper = serviceTicketManagerWrapper; _proxyTicketManagerWrapper = proxyTicketManagerWrapper; _casClient = casClient; _requestEvaluator = requestEvaluator; _casServices = casServices; Logger = NullLogger.Instance; T = NullLocalizer.Instance; }
public StubRequestHandler(IRequestEvaluator evaluator, IModelTransformer transformer, ILogger logger) { _evaluator = evaluator; _transformer = transformer; _logger = logger; }