Issue Description
The OnFunctionInvocationAsync method in the AnonymouseUserFilter class needs to be enhanced with better detection logic, specifically in the following code:
if (context.Arguments.TryGetValue("userName", out var userName) && userName!.ToString() == "guest")
{
context.Result = new FunctionResult(context.Function, "No discounts for anonymous users allowed");
return;
}
Expected Behavior
Improve the detection logic to handle edge cases and provide better validation.
Additional Information
This enhancement is necessary to ensure robustness in handling anonymous users.
Issue Description
The
OnFunctionInvocationAsyncmethod in theAnonymouseUserFilterclass needs to be enhanced with better detection logic, specifically in the following code:Expected Behavior
Improve the detection logic to handle edge cases and provide better validation.
Additional Information
This enhancement is necessary to ensure robustness in handling anonymous users.