token-handler: handle authorization through Epita CRI LDAP

This commit is contained in:
nemunaire 2019-03-13 11:19:51 +01:00
parent 58e541d6ad
commit 38902bee8d
6 changed files with 194 additions and 12 deletions

View file

@ -28,7 +28,11 @@ func showIPs(_ httprouter.Params, body []byte) (interface{}, error) {
r[sid] = make(map[string]string)
r[sid]["mac"] = std.MAC
if std.MAC == nil {
continue
}
r[sid]["mac"] = *std.MAC
r[sid]["vlan0"] = fmt.Sprintf("172.23.0.%d", std.IPSuffix())
r[sid]["vlan7"] = fmt.Sprintf("172.23.142.%d", std.IPSuffix())
}