SecurityScopes
This is a special class that you can define in a parameter in a dependency to obtain the OAuth2 scopes required by all the dependencies in the same chain. This way, multiple dependencies can have different scopes, even when used in the same path operation. And with this, you can access all the scopes required in all those dependencies in a single place.
Attributes
| Attribute | Type | Description |
|---|---|---|
| scopes | list[str] | The list of all the scopes required by dependencies. |
| scope_str | str | All the scopes required by all the dependencies in a single string separated by spaces, as defined in the OAuth2 specification. |
Constructor
Signature
def SecurityScopes(
scopes: list[str]| None = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| scopes | `list[str] | None` = None |
Signature
def SecurityScopes(
scopes: list[str]| None = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| scopes | `list[str] | None` = None |