-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
At the moment, the in-processs 4.2.0 version is not compatible with Microsoft.Azure.WebJobs.Extensions.OpenApi 1.5.1. The reason being that apparently the functions registered by the OpenApi assembly do not have any function name attributes (at least, that's what it looks like when debugging).
In FunctionsAuthorizeBindingProvider.cs:
private void ProcessAuthorization(ParameterInfo info)
{
MethodInfo methodInfo = (info.Member as MethodInfo) ?? throw new InvalidOperationException("Unable to bind authorization context for " + info.Name + ".");
Type declaringType = methodInfo.DeclaringType;
FunctionNameAttribute customAttribute = methodInfo.GetCustomAttribute<FunctionNameAttribute>();
// customAttribute is null here in the case of the OpenApi functions.
_options.RegisterFunctionAuthorizationAttributesMetadata<FunctionAuthorizeAttribute>(customAttribute.Name, declaringType, methodInfo);
}
Considering those endpoints are anonymous, just skipping processed item would do the trick I guess (didn't test this!)
The function in question is RenderOAuth2Redirect
Metadata
Metadata
Assignees
Labels
No labels