Skip to content

Commit

Permalink
Add xsc AuthConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
gailazar300 committed Mar 26, 2024
1 parent def18c5 commit b506b91
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions utils/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/jfrog/jfrog-client-go/utils/io/fileutils"
"github.com/jfrog/jfrog-client-go/utils/log"
xrayAuth "github.com/jfrog/jfrog-client-go/xray/auth"
xscAuth "github.com/jfrog/jfrog-client-go/xsc/auth"
"os"
"path/filepath"
"strconv"
Expand Down Expand Up @@ -572,6 +573,7 @@ type ServerDetails struct {
ArtifactoryUrl string `json:"artifactoryUrl,omitempty"`
DistributionUrl string `json:"distributionUrl,omitempty"`
XrayUrl string `json:"xrayUrl,omitempty"`
XscUrl string `json:"xscUrl,omitempty"`
MissionControlUrl string `json:"missionControlUrl,omitempty"`
PipelinesUrl string `json:"pipelinesUrl,omitempty"`
AccessUrl string `json:"accessUrl,omitempty"`
Expand Down Expand Up @@ -708,6 +710,12 @@ func (serverDetails *ServerDetails) CreateXrayAuthConfig() (auth.ServiceDetails,
return serverDetails.createAuthConfig(artAuth)
}

func (serverDetails *ServerDetails) CreateXscAuthConfig() (auth.ServiceDetails, error) {
ascAuth := xscAuth.NewXscDetails()
ascAuth.SetUrl(serverDetails.XscUrl)
return serverDetails.createAuthConfig(ascAuth)
}

func (serverDetails *ServerDetails) CreatePipelinesAuthConfig() (auth.ServiceDetails, error) {
pAuth := pipelinesAuth.NewPipelinesDetails()
pAuth.SetUrl(serverDetails.PipelinesUrl)
Expand Down

0 comments on commit b506b91

Please sign in to comment.