2016-10-31 13:32:17 +03:00
|
|
|
# Injection security definitions
|
|
|
|
|
2023-07-11 20:31:52 +03:00
|
|
|
You can inject the Security Definitions widget anywhere in your specification `description`:
|
2016-10-31 13:32:17 +03:00
|
|
|
|
|
|
|
```markdown
|
|
|
|
...
|
|
|
|
# Authorization
|
2023-07-11 20:31:52 +03:00
|
|
|
|
2016-10-31 13:32:17 +03:00
|
|
|
Some description
|
|
|
|
|
2023-07-11 20:31:52 +03:00
|
|
|
<!-- Redoc-Inject: <security-definitions> -->
|
2016-10-31 13:32:17 +03:00
|
|
|
...
|
|
|
|
```
|
2023-07-11 20:31:52 +03:00
|
|
|
The inject instruction is wrapped in an HTML comment,
|
|
|
|
so it is **visible only in Redoc** and not visible, for instance, in the SwaggerUI.
|
2016-10-31 13:32:17 +03:00
|
|
|
|
|
|
|
# Default behavior
|
|
|
|
|
2023-07-11 20:31:52 +03:00
|
|
|
If the injection tag is not found in the description, it is appended to the end
|
|
|
|
of description under the `Authentication` header.
|
|
|
|
|
|
|
|
If the `Authentication` header is already present in the description,
|
|
|
|
Security Definitions are not inserted or rendered.
|