Secure documentation site

Hi there,

Is there any way to password protect or demand a JWT when accessing the API’s documentation?

For an Endpoint we can add e.g. .securityIn(auth.bearer[BearerAuthorizationToken]().bearerFormat("JWT")). Is this also possible for the docs site? E.g. RedocInterpreter() .fromServerEndpoints(..) with added security.

Yes, you can add an additional security check for a ServerEndpoint (that’s the result of interpreting using Swagger/Redoc), with .prependSecurity.

See the docs for more details.

1 Like

Thanks, this is exactly what I was looking for.