Support for OpenAPI authentication documentation #1813
Answered
by
Goldziher
ctrl-Felix
asked this question in
Q&A
|
The OpenAPI schema supports definining authentication and protectecd API endpoints: Now I was wondering if Litestar already supports that, because I was not able to find/activate it. So if it's supported I'd be very grateful if someone could point me out how to do it. Otherwise I think it would make sense to add that. |
Answered by
Goldziher
Jun 20, 2023
Replies: 1 comment 2 replies
|
I believe this was answered in Discord - https://discord.com/channels/919193495116337154/919193495690936353/1118449174749388880 |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the
AbstractAuthenticationMiddlewareis an abstract class that needs to be implemented in a concrete way. Once you implement an authentication backend, you can configure your openapi specs to include authentication documentation for this.An example of how to do this can be found here: https://github.com/litestar-org/litestar/blob/main/litestar/contrib/jwt/jwt_auth.py#L68
There is no way for us to automagically know what you implemented.