|
|
@ -33,6 +33,7 @@ class RegistrationConfig(Config): |
|
|
|
|
|
|
|
|
|
|
|
self.registration_shared_secret = config.get("registration_shared_secret") |
|
|
|
self.registration_shared_secret = config.get("registration_shared_secret") |
|
|
|
self.macaroon_secret_key = config.get("macaroon_secret_key") |
|
|
|
self.macaroon_secret_key = config.get("macaroon_secret_key") |
|
|
|
|
|
|
|
self.bcrypt_rounds = config.get("bcrypt_rounds", 12) |
|
|
|
|
|
|
|
|
|
|
|
def default_config(self, **kwargs): |
|
|
|
def default_config(self, **kwargs): |
|
|
|
registration_shared_secret = random_string_with_symbols(50) |
|
|
|
registration_shared_secret = random_string_with_symbols(50) |
|
|
@ -48,6 +49,11 @@ class RegistrationConfig(Config): |
|
|
|
registration_shared_secret: "%(registration_shared_secret)s" |
|
|
|
registration_shared_secret: "%(registration_shared_secret)s" |
|
|
|
|
|
|
|
|
|
|
|
macaroon_secret_key: "%(macaroon_secret_key)s" |
|
|
|
macaroon_secret_key: "%(macaroon_secret_key)s" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set the number of bcrypt rounds used to generate password hash. |
|
|
|
|
|
|
|
# Larger numbers increase the work factor needed to generate the hash. |
|
|
|
|
|
|
|
# The default number of rounds is 12. |
|
|
|
|
|
|
|
bcrypt_rounds: 12 |
|
|
|
""" % locals() |
|
|
|
""" % locals() |
|
|
|
|
|
|
|
|
|
|
|
def add_arguments(self, parser): |
|
|
|
def add_arguments(self, parser): |
|
|
|