aboutsummaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorsanthoshivan23 <47689668+santhoshivan23@users.noreply.github.com>2023-06-22 22:07:21 +0530
committerGitHub <noreply@github.com>2023-06-22 16:37:21 +0000
commit45082d4dcefadceada1b4374f3876365887cfd4a (patch)
tree899fda990a71f16eb05073098196a2a1a1218bd3 /setup
parenta734b112c6577a23b87c6b54c50fb2e9a629cf2b (diff)
feat: admin APIs for token authenticated registration (#3101)
### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Santhoshivan Amudhan santhoshivan23@gmail.com`
Diffstat (limited to 'setup')
-rw-r--r--setup/config/config_clientapi.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/setup/config/config_clientapi.go b/setup/config/config_clientapi.go
index b6c74a75..44136e2a 100644
--- a/setup/config/config_clientapi.go
+++ b/setup/config/config_clientapi.go
@@ -13,6 +13,10 @@ type ClientAPI struct {
// secrets)
RegistrationDisabled bool `yaml:"registration_disabled"`
+ // If set, requires users to submit a token during registration.
+ // Tokens can be managed using admin API.
+ RegistrationRequiresToken bool `yaml:"registration_requires_token"`
+
// Enable registration without captcha verification or shared secret.
// This option is populated by the -really-enable-open-registration
// command line parameter as it is not recommended.
@@ -56,6 +60,7 @@ type ClientAPI struct {
func (c *ClientAPI) Defaults(opts DefaultOpts) {
c.RegistrationSharedSecret = ""
+ c.RegistrationRequiresToken = false
c.RecaptchaPublicKey = ""
c.RecaptchaPrivateKey = ""
c.RecaptchaEnabled = false