azure-functions-openapi-extension
azure-functions-openapi-extension copied to clipboard
How can I specify the ClientID and Scopes for an OIDC auth?
When using Swashbuckle.AspNetCore.Swagger I amd able to specify the ClientId to pre-fill the auth form:
app.UseSwaggerUI(o => o.OAuthClientId(Configuration["SwaggerUI:ClientId"]));
I can further specify the scopes to send with that request:
Flows = new OpenApiOAuthFlows
{
Implicit = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri("https://login.microsoftonline.com/common/oauth2/v2.0/authorize"),
Scopes = new Dictionary<string, string> { { $"api://{clientId}/access_as_user", "" } }
}
}
I can't figure out how to do that when using this library for my functions App - can you give any guidance?
Thanks
Hi, The same question occurs to me, have you resolved it?
Hi, Anyone found a solution for this?