summaryrefslogtreecommitdiff
path: root/internal/server/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/server/server.go')
-rw-r--r--internal/server/server.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/internal/server/server.go b/internal/server/server.go
index e7229c5..c34158a 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -108,9 +108,6 @@ type ConfigData struct {
// The type of configuration
Type string
-
- // The tokens
- Tokens oauth.Token
}
// Public gets the public data from the types package
@@ -120,7 +117,6 @@ func (c *ConfigData) Public(dg bool) srvtypes.Configuration {
VPNConfig: c.Config,
Protocol: protocol.New(c.Type),
DefaultGateway: dg,
- Tokens: c.Tokens.Public(),
}
}
@@ -154,13 +150,7 @@ func wireguardGetConfig(ctx context.Context, srv Server, preferTCP bool, openVPN
cfg = wireguard.ConfigAddKey(cfg, key)
}
- t := oauth.Token{}
- o := srv.OAuth()
- if o != nil {
- t = o.Token()
- }
-
- return &ConfigData{Config: cfg, Type: proto, Tokens: t}, nil
+ return &ConfigData{Config: cfg, Type: proto}, nil
}
func openVPNGetConfig(ctx context.Context, srv Server, preferTCP bool) (*ConfigData, error) {
@@ -178,14 +168,7 @@ func openVPNGetConfig(ctx context.Context, srv Server, preferTCP bool) (*ConfigD
b.StartTime = time.Now()
b.EndTime = exp
- t := oauth.Token{}
-
- o := srv.OAuth()
- if o != nil {
- t = o.Token()
- }
-
- return &ConfigData{Config: cfg, Type: "openvpn", Tokens: t}, nil
+ return &ConfigData{Config: cfg, Type: "openvpn"}, nil
}
func HasValidProfile(ctx context.Context, srv Server, wireguardSupport bool) (bool, error) {