$build = [
'#type' => 'openapi_ui',
'#openapi_schema' => …,
'#security' => [
'oauth' => [
// Insert oauth data here.
],
],
];
We would need to implement #2987434: Support config passing to allow injection of Authentication data. first before we can do this. the we need to add support to both the ui modules, to allow for population of the auth data.
What's challenging, is that it is highly dependent on site configuration: is Basic Auth installed? Is it enabled for all REST resources or just some? And if OAuth2 is installed, we should probably surface scopes? Or shouldn't we? Then we need to provide that data to the rest ui or plugin, in order to allow for that mechanism to work. Its all kinda complicated. At this point, I think the focus to pass the data where supported. I think that means that we will probably need to make #2983352: OpenAPI is returning invalid security definitions work correctly, so that we can pass valid information to the ui, which can actually be used to do something worth while.
Comments
Comment #2
richgerdesThe redoc module was moved into an independent project. This now applies to this modules integration with the OpenAPI UI module.
This depends on #2987434: Support config passing to allow injection of Authentication data. being implemented which would be the mechanism to facilitate this passing of configuration.