BaseAuthEvent¶
- pydantic model gafaelfawr.events.BaseAuthEvent¶
Base class for authentication events.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "BaseAuthEvent", "description": "Base class for authentication events.", "type": "object", "properties": { "username": { "description": "Username of authenticated user", "title": "Username", "type": "string" }, "service": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Service to which the user was authenticated", "title": "Service" }, "quota": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "API quota for this service, if one is imposed", "title": "Quota" }, "quota_used": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Amount of API quota used as of this request", "title": "Quota used" } }, "required": [ "username" ] }
- field quota: int | None = None¶
API quota for this service, if one is imposed
- field quota_used: int | None = None¶
Amount of API quota used as of this request
- field service: str | None = None¶
Service to which the user was authenticated
- field username: str [Required]¶
Username of authenticated user
- asdict()¶
Returns this model in dictionary form. This method differs from pydantic’s dict by converting all values to their Avro representation. It also doesn’t provide the exclude, include, by_alias, etc. parameters that dict provides.
- classmethod fake(**data)¶
Creates a fake instance of the model.
- Attributes:
data: Dict[str, Any] represent the user values to use in the instance
- Parameters:
data (
Any
)- Return type:
AvroBaseModel
- serialize(serialization_type='avro')¶
Overrides the base AvroModel’s serialize method to inject this class’s standardization factory method