mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
client: Remove Candid authentication
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-macaroon-bakery/macaroon-bakery/v3/httpbakery"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/zitadel/oidc/v2/pkg/oidc"
|
||||
|
||||
@@ -40,9 +39,6 @@ type ConnectionArgs struct {
|
||||
// Authentication type
|
||||
AuthType string
|
||||
|
||||
// Authentication interactor
|
||||
AuthInteractor []httpbakery.Interactor
|
||||
|
||||
// Custom proxy
|
||||
Proxy func(*http.Request) (*url.URL, error)
|
||||
|
||||
@@ -323,14 +319,13 @@ func httpsLXD(ctx context.Context, requestURL string, args *ConnectionArgs) (Ins
|
||||
httpBaseURL: *httpBaseURL,
|
||||
httpProtocol: "https",
|
||||
httpUserAgent: args.UserAgent,
|
||||
bakeryInteractor: args.AuthInteractor,
|
||||
ctxConnected: ctxConnected,
|
||||
ctxConnectedCancel: ctxConnectedCancel,
|
||||
eventConns: make(map[string]*websocket.Conn),
|
||||
eventListeners: make(map[string][]*EventListener),
|
||||
}
|
||||
|
||||
if shared.StringInSlice(args.AuthType, []string{"candid", "oidc"}) {
|
||||
if shared.StringInSlice(args.AuthType, []string{"oidc"}) {
|
||||
server.RequireAuthenticated(true)
|
||||
}
|
||||
|
||||
@@ -345,9 +340,7 @@ func httpsLXD(ctx context.Context, requestURL string, args *ConnectionArgs) (Ins
|
||||
}
|
||||
|
||||
server.http = httpClient
|
||||
if args.AuthType == "candid" {
|
||||
server.setupBakeryClient()
|
||||
} else if args.AuthType == "oidc" {
|
||||
if args.AuthType == "oidc" {
|
||||
server.setupOIDCClient(args.OIDCTokens)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user