types/authkey: include user object in response (#2542)

* types/authkey: include user object, not string

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* make preauthkeys use id

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* changelog

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* integration: wire up user id for auth keys

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

---------

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby
2025-04-30 12:45:08 +03:00
committed by GitHub
parent f1206328dc
commit 8f9fbf16f1
23 changed files with 454 additions and 779 deletions

View File

@@ -1680,7 +1680,10 @@ func TestAutoApproveMultiNetwork(t *testing.T) {
scenario.runHeadscaleRegister("user1", body)
} else {
pak, err := scenario.CreatePreAuthKey("user1", false, false)
userMap, err := headscale.MapUsers()
assertNoErr(t, err)
pak, err := scenario.CreatePreAuthKey(userMap["user1"].GetId(), false, false)
assertNoErr(t, err)
err = routerUsernet1.Login(headscale.GetEndpoint(), pak.Key)