From 733e0b18e2fb6e07324b118aa757b950b1f3f87f Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 22 Jul 2022 22:47:08 -0700 Subject: [PATCH] make sure build works for now --- restapi/operations/console_api.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/restapi/operations/console_api.go b/restapi/operations/console_api.go index 4ed745876..3be7cd71c 100644 --- a/restapi/operations/console_api.go +++ b/restapi/operations/console_api.go @@ -38,6 +38,7 @@ import ( "github.com/go-openapi/swag" "github.com/minio/console/models" + "github.com/minio/console/pkg/auth/idp/oauth2" "github.com/minio/console/restapi/operations/account" "github.com/minio/console/restapi/operations/auth" "github.com/minio/console/restapi/operations/bucket" @@ -58,7 +59,7 @@ import ( ) // NewConsoleAPI creates a new Console instance -func NewConsoleAPI(spec *loads.Document) *ConsoleAPI { +func NewConsoleAPI(spec *loads.Document, openIDProviders oauth2.OpenIDPCfg) *ConsoleAPI { return &ConsoleAPI{ handlers: make(map[string]map[string]http.Handler), formats: strfmt.Default, @@ -75,6 +76,8 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI { APIKeyAuthenticator: security.APIKeyAuth, BearerAuthenticator: security.BearerAuth, + OpenIDProviders: openIDProviders, + JSONConsumer: runtime.JSONConsumer(), MultipartformConsumer: runtime.DiscardConsumer, @@ -481,6 +484,9 @@ type ConsoleAPI struct { Middleware func(middleware.Builder) http.Handler useSwaggerUI bool + // Configuration passed in from MinIO for MinIO console. + OpenIDProviders oauth2.OpenIDPCfg + // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator