You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
???-info "Does Powertools implement any of the security schemes?"
1032
+
No. Powertools adds support for generating OpenAPI documentation with security schemes, but it doesn't implement any of the security schemes itself.
1020
1033
1021
-
Include extra parameters when exporting your OpenAPI specification to apply these customizations:
1034
+
OpenAPI uses the term security scheme for [authentication and authorization schemes](https://swagger.io/docs/specification/authentication/){target="_blank"}.
1035
+
When you're describing your API, declare security schemes at the top level, and reference them globally or per operation.
|[HTTP auth](https://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml){target="_blank"} |`HTTPBase`| HTTP authentication schemes using the Authorization header (e.g: [Basic auth](https://swagger.io/docs/specification/authentication/basic-authentication/){target="_blank"}, [Bearer](https://swagger.io/docs/specification/authentication/bearer-authentication/){target="_blank"}) |
1058
+
|[API keys](https://swagger.io/docs/specification/authentication/api-keys/https://swagger.io/docs/specification/authentication/api-keys/){target="_blank"} (e.g: query strings, cookies) |`APIKey`| API keys in headers, query strings or [cookies](https://swagger.io/docs/specification/authentication/cookie-authentication/){target="_blank"}. |
1059
+
|[OAuth 2](https://swagger.io/docs/specification/authentication/oauth2/){target="_blank"} |`OAuth2`| Authorization protocol that gives an API client limited access to user data on a web server. |
1060
+
|[OpenID Connect Discovery](https://swagger.io/docs/specification/authentication/openid-connect-discovery/){target="_blank"} |`OpenIdConnect`| Identity layer built [on top of the OAuth 2.0 protocol](https://openid.net/developers/how-connect-works/){target="_blank"} and supported by some OAuth 2.0. |
1061
+
1062
+
???-note "Using OAuth2 with the Swagger UI?"
1063
+
You can use the `OAuth2Config` option to configure a default OAuth2 app on the generated Swagger UI.
0 commit comments