Implemented JWT authentication

This commit is contained in:
Tim Beatham
2023-10-01 19:01:35 +01:00
parent c819bec63d
commit 94afd68460
14 changed files with 659 additions and 20 deletions

View File

@@ -1,6 +1,8 @@
package ctrlserver
import (
"github.com/tim-beatham/wgmesh/pkg/auth"
"github.com/tim-beatham/wgmesh/pkg/conn"
"golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
@@ -25,7 +27,9 @@ type Mesh struct {
* is running
*/
type MeshCtrlServer struct {
Client *wgctrl.Client
Meshes map[string]Mesh
IfName string
Client *wgctrl.Client
Meshes map[string]Mesh
IfName string
Conn *conn.WgCtrlConnection
JwtManager *auth.JwtManager
}