Remove unnecessary oauth method
Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
This commit is contained in:
@@ -20,16 +20,20 @@ const (
|
|||||||
AliasPortGroupRegex = "^.*pwd" + AliasGroupRegex + "(?:-?(" + PortRegex + "))?\\..*$"
|
AliasPortGroupRegex = "^.*pwd" + AliasGroupRegex + "(?:-?(" + PortRegex + "))?\\..*$"
|
||||||
)
|
)
|
||||||
|
|
||||||
var NameFilter = regexp.MustCompile(PWDHostPortGroupRegex)
|
var (
|
||||||
var AliasFilter = regexp.MustCompile(AliasPortGroupRegex)
|
NameFilter = regexp.MustCompile(PWDHostPortGroupRegex)
|
||||||
|
AliasFilter = regexp.MustCompile(AliasPortGroupRegex)
|
||||||
|
)
|
||||||
|
|
||||||
var PortNumber, SessionsFile, PWDContainerName, L2ContainerName, L2Subdomain, HashKey, SSHKeyPath, L2RouterIP, CookieHashKey, CookieBlockKey string
|
var (
|
||||||
var UseLetsEncrypt, ExternalDindVolume, NoWindows bool
|
PortNumber, SessionsFile, PWDContainerName, L2ContainerName, L2Subdomain, HashKey, SSHKeyPath, L2RouterIP, CookieHashKey, CookieBlockKey string
|
||||||
var LetsEncryptCertsDir string
|
UseLetsEncrypt, ExternalDindVolume, NoWindows bool
|
||||||
var MaxLoadAvg float64
|
LetsEncryptCertsDir string
|
||||||
var ForceTLS bool
|
MaxLoadAvg float64
|
||||||
var SecureCookie *securecookie.SecureCookie
|
ForceTLS bool
|
||||||
var AdminToken string
|
SecureCookie *securecookie.SecureCookie
|
||||||
|
AdminToken string
|
||||||
|
)
|
||||||
|
|
||||||
// Unsafe enables a number of unsafe features when set. It is principally
|
// 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
|
// intended to be used in development. For example, it allows the caller to
|
||||||
@@ -71,5 +75,4 @@ func ParseFlags() {
|
|||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
SecureCookie = securecookie.New([]byte(CookieHashKey), []byte(CookieBlockKey))
|
SecureCookie = securecookie.New([]byte(CookieHashKey), []byte(CookieBlockKey))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,7 +273,6 @@ func initOauthProviders(p *types.Playground) {
|
|||||||
if p.DockerClientID != "" && p.DockerClientSecret != "" {
|
if p.DockerClientID != "" && p.DockerClientSecret != "" {
|
||||||
|
|
||||||
endpoint := getDockerEndpoint(p)
|
endpoint := getDockerEndpoint(p)
|
||||||
oauth2.RegisterBrokenAuthHeaderProvider(fmt.Sprintf(".%s", endpoint))
|
|
||||||
conf := &oauth2.Config{
|
conf := &oauth2.Config{
|
||||||
ClientID: p.DockerClientID,
|
ClientID: p.DockerClientID,
|
||||||
ClientSecret: p.DockerClientSecret,
|
ClientSecret: p.DockerClientSecret,
|
||||||
|
|||||||
@@ -208,8 +208,6 @@ func LoginCallback(rw http.ResponseWriter, req *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("Lalalala %#v\n", user)
|
|
||||||
|
|
||||||
cookieData := CookieID{Id: user.Id, UserName: user.Name, UserAvatar: user.Avatar, ProviderId: user.ProviderUserId}
|
cookieData := CookieID{Id: user.Id, UserName: user.Name, UserAvatar: user.Avatar, ProviderId: user.ProviderUserId}
|
||||||
|
|
||||||
host := "localhost"
|
host := "localhost"
|
||||||
|
|||||||
Reference in New Issue
Block a user