MCPcopy Create free account
hub / github.com/foxcpp/maddy / Configure

Method Configure

internal/auth/netauth/netauth.go:43–62  ·  view source on GitHub ↗
(inlineArgs []string, cfg *config.Map)

Source from the content-addressed store, hash-verified

41}
42
43func (a *Auth) Configure(inlineArgs []string, cfg *config.Map) error {
44 if len(inlineArgs) > 0 {
45 return fmt.Errorf("%s: inline arguments are not used", modName)
46 }
47
48 l := hclog.New(&hclog.LoggerOptions{Output: a.log})
49 n, err := netauth.NewWithLog(l)
50 if err != nil {
51 return err
52 }
53 a.nacl = n
54 a.nacl.SetServiceName("maddy")
55 cfg.String("require_group", false, false, "", &a.mustGroup)
56 cfg.Bool("debug", true, false, &a.log.Debug)
57 if _, err := cfg.Process(); err != nil {
58 return err
59 }
60
61 return nil
62}
63
64// Name returns "auth.netauth" as the fixed module name.
65func (a *Auth) Name() string {

Callers

nothing calls this directly

Calls 3

BoolMethod · 0.80
ProcessMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected