File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3348,22 +3348,12 @@ If you're using a specification with [Security Schemes](https://spec.openapis.or
33483348> Out-of-the-box, the server-side code generated by ` oapi-codegen ` does not provide security validation.
33493349>
33503350> To perform authentication, you will need to use the [ validation middleware] ( #requestresponse-validation-middleware ) .
3351- >
3352- > In the future, we plan to [ implement server-side validation in the generated code] ( https://github.com/oapi-codegen/oapi-codegen/issues/1524 )
33533351
33543352To see how this can work, check out the [ authenticated API example] ( examples/authenticated-api/echo ) .
33553353
33563354If an operation includes an empty ` {} ` security alternative, generated server
3357- middleware treats that operation as allowing anonymous requests and does not set
3358- scope context for that operation.
3359-
3360- > [ !WARNING]
3361- > This is a behavior change for specs that already list an anonymous ` {} ` alternative
3362- > alongside named schemes, in any position (e.g. ` security: [{bearerAuth: []}, {}] ` ).
3363- > Previously, the generated middleware still set the scheme's scopes context key (such as
3364- > ` BearerAuthScopes ` ); after regenerating, that key is no longer set for such operations,
3365- > so authentication middleware that enforces auth based on its presence will treat those
3366- > requests as anonymous.
3355+ middleware treats that operation as allowing anonymous requests and doesn't embed required
3356+ security scopes in the request context.
33673357
33683358### On the client
33693359
You can’t perform that action at this time.
0 commit comments