Remove unnecessary oauth method

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
Marcos Lilljedahl
2022-07-13 18:26:52 -03:00
parent a5a23bf2d9
commit 7188d83f86
3 changed files with 13 additions and 13 deletions

View File

@@ -20,16 +20,20 @@ const (
AliasPortGroupRegex = "^.*pwd" + AliasGroupRegex + "(?:-?(" + PortRegex + "))?\\..*$"
)
var NameFilter = regexp.MustCompile(PWDHostPortGroupRegex)
var AliasFilter = regexp.MustCompile(AliasPortGroupRegex)
var (
NameFilter = regexp.MustCompile(PWDHostPortGroupRegex)
AliasFilter = regexp.MustCompile(AliasPortGroupRegex)
)
var PortNumber, SessionsFile, PWDContainerName, L2ContainerName, L2Subdomain, HashKey, SSHKeyPath, L2RouterIP, CookieHashKey, CookieBlockKey string
var UseLetsEncrypt, ExternalDindVolume, NoWindows bool
var LetsEncryptCertsDir string
var MaxLoadAvg float64
var ForceTLS bool
var SecureCookie *securecookie.SecureCookie
var AdminToken string
var (
PortNumber, SessionsFile, PWDContainerName, L2ContainerName, L2Subdomain, HashKey, SSHKeyPath, L2RouterIP, CookieHashKey, CookieBlockKey string
UseLetsEncrypt, ExternalDindVolume, NoWindows bool
LetsEncryptCertsDir string
MaxLoadAvg float64
ForceTLS bool
SecureCookie *securecookie.SecureCookie
AdminToken string
)
// Unsafe enables a number of unsafe features when set. It is principally
// intended to be used in development. For example, it allows the caller to
@@ -71,5 +75,4 @@ func ParseFlags() {
flag.Parse()
SecureCookie = securecookie.New([]byte(CookieHashKey), []byte(CookieBlockKey))
}

View File

@@ -273,7 +273,6 @@ func initOauthProviders(p *types.Playground) {
if p.DockerClientID != "" && p.DockerClientSecret != "" {
endpoint := getDockerEndpoint(p)
oauth2.RegisterBrokenAuthHeaderProvider(fmt.Sprintf(".%s", endpoint))
conf := &oauth2.Config{
ClientID: p.DockerClientID,
ClientSecret: p.DockerClientSecret,

View File

@@ -208,8 +208,6 @@ func LoginCallback(rw http.ResponseWriter, req *http.Request) {
return
}
fmt.Printf("Lalalala %#v\n", user)
cookieData := CookieID{Id: user.Id, UserName: user.Name, UserAvatar: user.Avatar, ProviderId: user.ProviderUserId}
host := "localhost"