added host pull model, made API

This commit is contained in:
0xdcarns
2023-03-22 14:47:13 -04:00
parent d3a7e704f2
commit 63eac1e79c
4 changed files with 67 additions and 7 deletions

View File

@@ -129,8 +129,8 @@ func VerifyUserToken(tokenString string) (username string, networks []string, is
return "", nil, false, err
}
// VerifyToken - [nodes] Only
func VerifyToken(tokenString string) (hostID string, mac string, network string, err error) {
// VerifyHostToken - [hosts] Only
func VerifyHostToken(tokenString string) (hostID string, mac string, network string, err error) {
claims := &models.Claims{}
// this may be a stupid way of serving up a master key