Skip to content

Commit 9b1015f

Browse files
committed
provisioner -> issuer | omitEmpty
1 parent 8086285 commit 9b1015f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

utils/cautils/bootstrap.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type bootstrapAPIResponse struct {
2828
CaURL string `json:"url"`
2929
Fingerprint string `json:"fingerprint"`
3030
RedirectURL string `json:"redirect-url"`
31-
Provisioner string `json:"provisioner"`
31+
Issuer string `json:"issuer"`
3232
MinPasswordLength int `json:"min-password-length"`
3333
}
3434

@@ -57,13 +57,13 @@ type bootstrapOption func(bc *bootstrapContext)
5757
type bootstrapContext struct {
5858
defaultContextName string
5959
redirectURL string
60-
provisioner string
60+
issuer string
6161
minPasswordLength int
6262
}
6363

64-
func withProvisioner(provisioner string) bootstrapOption {
64+
func withIssuer(issuer string) bootstrapOption {
6565
return func(bc *bootstrapContext) {
66-
bc.provisioner = provisioner
66+
bc.issuer = issuer
6767
}
6868
}
6969

@@ -90,8 +90,8 @@ type bootstrapConfig struct {
9090
Fingerprint string `json:"fingerprint"`
9191
Root string `json:"root"`
9292
Redirect string `json:"redirect-url"`
93-
Provisioner string `json:"provisioner"`
94-
MinPasswordLength int `json:"min-password-length"`
93+
Issuer string `json:"issuer,omitempty"`
94+
MinPasswordLength int `json:"min-password-length,omitempty"`
9595
}
9696

9797
func bootstrap(ctx *cli.Context, caURL, fingerprint string, opts ...bootstrapOption) error {
@@ -175,8 +175,8 @@ func bootstrap(ctx *cli.Context, caURL, fingerprint string, opts ...bootstrapOpt
175175
if bc.minPasswordLength > 0 {
176176
bootConf.MinPasswordLength = bc.minPasswordLength
177177
}
178-
if bc.provisioner != "" {
179-
bootConf.Provisioner = bc.provisioner
178+
if bc.issuer != "" {
179+
bootConf.Issuer = bc.issuer
180180
}
181181
b, err := json.MarshalIndent(bootConf, "", " ")
182182
if err != nil {
@@ -283,8 +283,8 @@ func BootstrapTeamAuthority(ctx *cli.Context, team, teamAuthority string) error
283283
withDefaultContextValues(teamAuthority + "." + team),
284284
withRedirectURL(r.RedirectURL),
285285
}
286-
if r.Provisioner != "" {
287-
bootOpts = append(bootOpts, withProvisioner(r.Provisioner))
286+
if r.Issuer != "" {
287+
bootOpts = append(bootOpts, withIssuer(r.Issuer))
288288
}
289289
if r.MinPasswordLength > 0 {
290290
bootOpts = append(bootOpts, withMinPasswordLength(r.MinPasswordLength))

0 commit comments

Comments
 (0)