Remove special case for authkey

We no longer have weird expire behaviour, so we dont need this case
This commit is contained in:
Kristoffer Dalby 2021-11-21 13:45:19 +00:00
parent a2b9f3bede
commit 8ccc51ae57

7
api.go
View File

@ -132,13 +132,6 @@ func (h *Headscale) RegistrationHandler(ctx *gin.Context) {
return return
} }
// We dont care about expiry time if the method is AuthKey, as we dont set that.
if machine.Registered && machine.RegisterMethod == RegisterMethodAuthKey {
h.handleMachineValidRegistration(ctx, machineKey, *machine)
return
}
if machine.Registered && !machine.isExpired() { if machine.Registered && !machine.isExpired() {
h.handleMachineValidRegistration(ctx, machineKey, *machine) h.handleMachineValidRegistration(ctx, machineKey, *machine)