Authorization Context¶
authorization_context
¶
Authorization context bundled for a single authorization decision.
AuthorizationContext
dataclass
¶
Bundles the information needed for a single authorization decision.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user_id
|
str
|
The unique identifier of the user requesting access. |
required |
roles
|
list[str] | None
|
Roles assigned to the user (e.g. |
None
|
resource_id
|
str | None
|
Optional identifier of the resource being accessed. |
None
|
resource_type
|
str | None
|
Optional discriminator for the resource kind |
None
|
action
|
str | None
|
Optional name of the action being performed |
None
|
metadata
|
dict[str, Any] | None
|
Arbitrary key-value pairs that checkers may inspect. |
None
|