Resolve client authentication issue in daemon mode (#1181)

This commit is contained in:
Bethuel Mmbaga
2023-09-28 15:02:37 +03:00
committed by GitHub
parent 830dee1771
commit 1956ca169e
8 changed files with 164 additions and 147 deletions

View File

@@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"os"
"reflect"
"strings"
)
@@ -61,8 +60,3 @@ func isValidAccessToken(token string, audience string) error {
return fmt.Errorf("invalid JWT token audience field")
}
// isLinuxRunningDesktop checks if a Linux OS is running desktop environment
func isLinuxRunningDesktop() bool {
return os.Getenv("DESKTOP_SESSION") != "" || os.Getenv("XDG_CURRENT_DESKTOP") != ""
}