cattle_grid.extensions.examples.simple_register
Sample configuration
[[extensions]]
module = "cattle_grid.extensions.examples.simple_register"
api_prefix = "/simple_register"
[[extensions.config.registration_types]]
name = "dev"
permissions = ["dev"]
extra_parameters = ["fediverse"]
extension
module-attribute
extension = Extension(
"simple_register",
__name__,
config_class=RegisterConfiguration,
)
Definition of the extension
config
RegisterConfiguration
Bases: BaseModel
Configuration for the register endpoint
Parameters:
Name | Type | Description | Default |
---|---|---|---|
registration_types
|
list[RegistrationType]
|
List of registration types |
required |
Source code in cattle_grid/extensions/examples/simple_register/config.py
RegistrationType
Bases: BaseModel
Configuration for one registration path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
name of the registration. Will be part of the path, i.e. |
required |
permissions
|
list[str]
|
List of permissions given to the registering account. |
required |
extra_parameters
|
list[str]
|
Extra parameters that should be in the request, will be stored in the actors meta information |
[]
|