Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

Commit

Permalink
Rename custom_profile_attributes to profile
Browse files Browse the repository at this point in the history
  • Loading branch information
conor-mullen committed Sep 5, 2019
1 parent c91719f commit 258ed72
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/okta_app_oauth/custom_attributes.tf
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ resource "okta_app_oauth" "test" {
custom_client_id = "something_from_somewhere"
token_endpoint_auth_method = "client_secret_basic"

custom_profile_attributes = <<JSON
profile = <<JSON
{
"customAttribute123": "testing-custom-attribute"
}
2 changes: 1 addition & 1 deletion examples/okta_app_oauth/custom_attributes_array.tf
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ resource "okta_app_oauth" "test" {
custom_client_id = "something_from_somewhere"
token_endpoint_auth_method = "client_secret_basic"

custom_profile_attributes = <<JSON
profile = <<JSON
{
"array123": ["test"],
"number123": 1
4 changes: 2 additions & 2 deletions okta/resource_app_oauth.go
Original file line number Diff line number Diff line change
@@ -237,11 +237,11 @@ func resourceAppOAuth() *schema.Resource {
Default: true,
Description: "Do not display application icon to users",
},
"custom_profile_attributes": &schema.Schema{
"profile": &schema.Schema{
Type: schema.TypeString,
StateFunc: normalizeDataJSON,
Optional: true,
Description: "Custom JSON returned by GET requests to api/v1/apps/{appId}",
Description: "Custom JSON that represents an OAuth application's profile",
},
}),
}
8 changes: 4 additions & 4 deletions okta/resource_app_oauth_test.go
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ func TestAccAppOauth_badGrantTypes(t *testing.T) {
})
}

// Tests an OAuth application with custom profile attributes. This tests with a nested JSON object as well as an array.
// Tests an OAuth application with profile attributes. This tests with a nested JSON object as well as an array.
func TestAccAppOauth_customProfileAttributes(t *testing.T) {
ri := acctest.RandInt()
mgr := newFixtureManager(appOAuth)
@@ -133,7 +133,7 @@ func TestAccAppOauth_customProfileAttributes(t *testing.T) {
ensureResourceExists(resourceName, createDoesAppExist(okta.NewOpenIdConnectApplication())),
resource.TestCheckResourceAttr(resourceName, "label", buildResourceName(ri)),
resource.TestCheckResourceAttr(resourceName, "status", "ACTIVE"),
resource.TestCheckResourceAttr(resourceName, "custom_profile_attributes", "{\"customAttribute123\":\"testing-custom-attribute\"}"),
resource.TestCheckResourceAttr(resourceName, "profile", "{\"customAttribute123\":\"testing-custom-attribute\"}"),
),
},
{
@@ -142,7 +142,7 @@ func TestAccAppOauth_customProfileAttributes(t *testing.T) {
ensureResourceExists(resourceName, createDoesAppExist(okta.NewOpenIdConnectApplication())),
resource.TestCheckResourceAttr(resourceName, "label", buildResourceName(ri)),
resource.TestCheckResourceAttr(resourceName, "status", "ACTIVE"),
resource.TestCheckResourceAttr(resourceName, "custom_profile_attributes", "{\"array123\":[\"test\"],\"number123\":1}"),
resource.TestCheckResourceAttr(resourceName, "profile", "{\"array123\":[\"test\"],\"number123\":1}"),
),
},
{
@@ -151,7 +151,7 @@ func TestAccAppOauth_customProfileAttributes(t *testing.T) {
ensureResourceExists(resourceName, createDoesAppExist(okta.NewOpenIdConnectApplication())),
resource.TestCheckResourceAttr(resourceName, "label", buildResourceName(ri)),
resource.TestCheckResourceAttr(resourceName, "status", "ACTIVE"),
resource.TestCheckResourceAttr(resourceName, "custom_profile_attributes", ""),
resource.TestCheckResourceAttr(resourceName, "profile", ""),
),
},
},

0 comments on commit 258ed72

Please # to comment.