File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 99 "fmt"
1010 "io"
1111 "net/http"
12+ "os"
1213
1314 "github.com/redhat-developer/app-services-cli/pkg/core/logging"
1415 kafkamgmtclient "github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client"
@@ -17,7 +18,13 @@ import (
1718// Temporary hack that we use to determine if
1819// Our CLI needs to use mas-sso token
1920func ShouldUseMasSSO (logger logging.Logger , apiUrl string ) bool {
20- req , err := http .NewRequest ("GET" , apiUrl + "/api/kafkas_mgmt/v1/sso_providers" , nil )
21+ finalUrl := apiUrl + "/api/kafkas_mgmt/v1/sso_providers"
22+ externalUrl := os .Getenv ("RHOAS_CUSTOM_SSO_PROVIDER_URL" )
23+ if externalUrl != "" {
24+ finalUrl = externalUrl
25+ }
26+
27+ req , err := http .NewRequest ("GET" , finalUrl , nil )
2128 if err != nil {
2229 logger .Debug ("Error when fetching auth config" , err )
2330 return true
You can’t perform that action at this time.
0 commit comments