/// <summary> /// Evaluates whether a user meets the requirements for this authorization policy. /// </summary> /// <param name="evaluationContext">An <see cref="T:System.IdentityModel.Policy.EvaluationContext"/> that contains the claim set that the authorization policy evaluates.</param> /// <param name="state">A <see cref="T:System.Object"/>, passed by reference that represents the custom state for this authorization policy.</param> /// <returns> /// false if the <see cref="M:System.IdentityModel.Policy.IAuthorizationPolicy.Evaluate(System.IdentityModel.Policy.EvaluationContext,System.Object@)"/> method for this authorization policy must be called if additional claims are added by other authorization policies to <paramref name="evaluationContext"/>; otherwise, true to state no additional evaluation is required by this authorization policy. /// </returns> public bool Evaluate(EvaluationContext evaluationContext, ref object state) { RequestContext.SetContext(identityInfo, tenantInfo, ServicesHelper.GetCurrentCulture(), ServicesHelper.GetClientTimeZone()); return(true); }
/// <summary> /// Injects a call to 'ServicesHelper.FreeRequestContextData( )' after the WCF method call has completed. /// </summary> /// <param name="operationName"> /// Name of the WCF method being called. /// </param> /// <param name="outputs"> /// Parameters being passed out of the method. /// </param> /// <param name="returnValue"> /// Methods return value. /// </param> /// <param name="correlationState"> /// Correlation state returned by the BeforeCall method. /// </param> public void AfterCall(string operationName, object [] outputs, object returnValue, object correlationState) { ServicesHelper.FreeRequestContextData( ); }