public void CustomUserValidation(object sender, OperationValidationEventArgs e)
        {
            //Let's say we had extra permissions that were outside of FIM that we needed to check
            //We could do these calls here

            e.IsValid = true;
        }
 private void ValidateOwner(object sender, OperationValidationEventArgs e)
 {
     if (string.IsNullOrEmpty(owner))
     {
         owner     = ExtractCallerName(e.ClaimSets);
         e.IsValid = true;
         Console.WriteLine("Owner: " + owner);
     }
     if (owner.Equals(ExtractCallerName(e.ClaimSets)))
     {
         e.IsValid = true;
     }
 }
Exemplo n.º 3
0
        void receiveActivity1_OperationValidation(object sender, OperationValidationEventArgs e)
        {
            OperationContext context    = OperationContext.Current;
            bool             authorized = false;

            foreach (ClaimSet claims in context.ServiceSecurityContext.AuthorizationContext.ClaimSets)
            {
                if (claims.ContainsClaim(AuthorizedClaim))
                {
                    authorized = true;
                }
            }
            e.IsValid = authorized;
        }