dns3l / dns3l-core

Core functionality of dns3l written in Go
1 stars 3 forks source link

Expose groups_* to client via /info #62

Closed iaean closed 1 year ago

iaean commented 1 year ago

To support https://github.com/dns3l/web/issues/21 it would be great if the server can publish a configured token groups delimiter and prefix to the client. API /info seems the natural candidate.

{ "version": { },
  "contact": { },
  "auth": {
    "groups-prefix": "PRE_",
    "groups-domain-delim": "_" } }

In the same context it would be great to streamline the config a little bit.

auth:
  groups_prefix: PRE_ # default "" (empty)
  # groups_replace_dot: true | false
  groups_domain_delim: _ # default "." or "" (empty)

Actually the delimiter is hardcoded to _. Which is probably not very flexible.