Forráskód Böngészése

Rename new fields as per feedback to remove AAD from the name

vijayjt 4 éve
szülő
commit
4a10f2c584
2 módosított fájl, 5 hozzáadás és 5 törlés
  1. 3 3
      authority/provisioner/azure.go
  2. 2 2
      authority/provisioner/azure_test.go

+ 3 - 3
authority/provisioner/azure.go

@@ -90,7 +90,7 @@ type Azure struct {
 	TenantID               string   `json:"tenantID"`
 	ResourceGroups         []string `json:"resourceGroups"`
 	SubscriptionIDs        []string `json:"subscriptionIDs"`
-	AadObjectIDs           []string `json:"aadObjectIDs"`
+	ObjectIDs              []string `json:"ObjectIDs"`
 	Audience               string   `json:"audience,omitempty"`
 	DisableCustomSANs      bool     `json:"disableCustomSANs"`
 	DisableTrustOnFirstUse bool     `json:"disableTrustOnFirstUse"`
@@ -308,9 +308,9 @@ func (p *Azure) AuthorizeSign(ctx context.Context, token string) ([]SignOption,
 	}
 
 	// Filter by Azure AD identity object id
-	if len(p.AadObjectIDs) > 0 {
+	if len(p.ObjectIDs) > 0 {
 		var found bool
-		for _, i := range p.AadObjectIDs {
+		for _, i := range p.ObjectIDs {
 			if i == identityObjectID {
 				found = true
 				break

+ 2 - 2
authority/provisioner/azure_test.go

@@ -403,7 +403,7 @@ func TestAzure_AuthorizeSign(t *testing.T) {
 	p7, err := generateAzure()
 	assert.FatalError(t, err)
 	p7.TenantID = p1.TenantID
-	p7.AadObjectIDs = []string{"the-oid"}
+	p7.ObjectIDs = []string{"the-oid"}
 	p7.config = p1.config
 	p7.oidcConfig = p1.oidcConfig
 	p7.keyStore = p1.keyStore
@@ -411,7 +411,7 @@ func TestAzure_AuthorizeSign(t *testing.T) {
 	p8, err := generateAzure()
 	assert.FatalError(t, err)
 	p8.TenantID = p1.TenantID
-	p8.AadObjectIDs = []string{"foobarzar"}
+	p8.ObjectIDs = []string{"foobarzar"}
 	p8.config = p1.config
 	p8.oidcConfig = p1.oidcConfig
 	p8.keyStore = p1.keyStore