Add configuration option to disable signup
close #51 Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -21,8 +21,9 @@ import (
|
||||
|
||||
type (
|
||||
authConfig struct {
|
||||
Cookie cookieConfig `json:"cookie"`
|
||||
Password passwordConfig `json:"password"`
|
||||
Cookie cookieConfig `json:"cookie"`
|
||||
Password passwordConfig `json:"password"`
|
||||
DisableSignup bool `json:"disable-signup"`
|
||||
}
|
||||
|
||||
cookieConfig struct {
|
||||
|
||||
@@ -87,6 +87,7 @@ func New() *Implm {
|
||||
Duration: 24,
|
||||
Domain: "localhost",
|
||||
},
|
||||
DisableSignup: false,
|
||||
},
|
||||
AWS: awsConfig{
|
||||
Region: "us-east-1",
|
||||
@@ -172,6 +173,7 @@ func (impl *Implm) Run(
|
||||
hp,
|
||||
impl.cfg.Auth.Cookie.Secret,
|
||||
impl.cfg.Hostname,
|
||||
impl.cfg.Auth.DisableSignup,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot create usrmgr service: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user