add expiration from OIDC token to machine
This commit is contained in:
parent
4e2c4f92d3
commit
7157e14aff
3 changed files with 9 additions and 1 deletions
|
@ -852,6 +852,7 @@ func getTags(
|
|||
func (h *Headscale) RegisterMachineFromAuthCallback(
|
||||
nodeKeyStr string,
|
||||
namespaceName string,
|
||||
machineExpiry *time.Time,
|
||||
registrationMethod string,
|
||||
) (*Machine, error) {
|
||||
nodeKey := key.NodePublic{}
|
||||
|
@ -885,6 +886,10 @@ func (h *Headscale) RegisterMachineFromAuthCallback(
|
|||
registrationMachine.NamespaceID = namespace.ID
|
||||
registrationMachine.RegisterMethod = registrationMethod
|
||||
|
||||
if machineExpiry != nil {
|
||||
registrationMachine.Expiry = machineExpiry
|
||||
}
|
||||
|
||||
machine, err := h.RegisterMachine(
|
||||
registrationMachine,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue