File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -375,6 +375,26 @@ operationIds.
375
375
In order to work around this, you can override ` get_operation_id_base() ` to
376
376
provide a different base for name part of the ID.
377
377
378
+ #### ` get_security_schemes() `
379
+
380
+ Generates the OpenAPI ` securitySchemes ` components based on:
381
+ - Your default ` authentication_classes ` (` settings.DEFAULT_AUTHENTICATION_CLASSES ` )
382
+ - Per-view non-default ` authentication_classes `
383
+
384
+ These are generated using the authentication classes' ` openapi_security_scheme() ` class method. If you
385
+ extend ` BaseAuthentication ` with your own authentication class, you can add this class method to return
386
+ the appropriate security scheme object.
387
+
388
+ #### ` get_security_requirements() `
389
+
390
+ Root-level security requirements (the top-level ` security ` object) are generated based on the
391
+ default authentication classes. Operation-level security requirements are generated only if the given view's
392
+ ` authentication_classes ` differ from the defaults.
393
+
394
+ These are generated using the authentication classes' ` openapi_security_requirement() ` class
395
+ method. If you extended ` BaseAuthentication ` with your own authentication class, you can add this
396
+ class method to return the appropriate list of security requirements objects.
397
+
378
398
### ` AutoSchema.__init__() ` kwargs
379
399
380
400
` AutoSchema ` provides a number of ` __init__() ` kwargs that can be used for
You can’t perform that action at this time.
0 commit comments