mirror of
https://github.com/juanfont/headscale.git
synced 2025-01-19 10:20:05 +09:00
add to cache as part of cli reauth
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
b177b24c6d
commit
2d4500f60f
1 changed files with 6 additions and 2 deletions
|
@ -255,14 +255,18 @@ func (h *Headscale) handleRegister(
|
|||
// TODO(juan): RegisterRequest includes an Expiry time, that we could optionally use
|
||||
node.Expiry = &time.Time{}
|
||||
|
||||
// TODO(kradalby): do we need to rethink this as part of authflow?
|
||||
// If we are here it means the client needs to be reauthorized,
|
||||
// we need to make sure the NodeKey matches the one in the request
|
||||
// TODO(juan): What happens when using fast user switching between two
|
||||
// headscale-managed tailnets?
|
||||
node.NodeKey = regReq.NodeKey
|
||||
h.registrationCache.Set(
|
||||
machineKey.String(),
|
||||
*node,
|
||||
registrationId,
|
||||
types.RegisterNode{
|
||||
Node: *node,
|
||||
Registered: make(chan struct{}),
|
||||
},
|
||||
)
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue