mirror of
https://github.com/juanfont/headscale.git
synced 2025-10-16 11:51:21 +00:00
Unmarshal keys in the non-deprecated way
This commit is contained in:
4
oidc.go
4
oidc.go
@@ -15,7 +15,6 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/patrickmn/go-cache"
|
||||
"github.com/rs/zerolog/log"
|
||||
"go4.org/mem"
|
||||
"golang.org/x/oauth2"
|
||||
"gorm.io/gorm"
|
||||
"tailscale.com/types/key"
|
||||
@@ -192,7 +191,8 @@ func (h *Headscale) OIDCCallback(ctx *gin.Context) {
|
||||
|
||||
machineKeyStr, machineKeyOK := machineKeyIf.(string)
|
||||
|
||||
machineKey, err := key.ParseMachinePublicUntyped(mem.S(machineKeyStr))
|
||||
var machineKey key.MachinePublic
|
||||
err = machineKey.UnmarshalText([]byte(machineKeyStr))
|
||||
if err != nil {
|
||||
log.Error().
|
||||
Msg("could not parse machine public key")
|
||||
|
Reference in New Issue
Block a user