token-handler: handle authorization through Epita CRI LDAP
This commit is contained in:
parent
58e541d6ad
commit
38902bee8d
6 changed files with 194 additions and 12 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Reference in a new issue