Skip to content

Commit

Permalink
feat(azuread_application): add public_client
Browse files Browse the repository at this point in the history
BREAKING: changed fallback_public_client_enabled setting from public_client to fallback_public_client_enabled
added public_client option
  • Loading branch information
Simon Schneider committed Jul 1, 2024
1 parent 9706af0 commit c54343c
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/standalone-azuread.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"azuread/105-azuread-application-with-optional-claims",
"azuread/106-azuread-application-with-api-scopes",
"azuread/108-azuread-application-with-app-roles",
"azuread/109-azuread-application-with-public-client",
"azuread/201-groups-and-roles"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ azuread_apps = {

azuread_applications = {
test_client_v1 = {
useprefix = true
application_name = "test-client-v1"
public_client = true
useprefix = true
application_name = "test-client-v1"
fallback_public_client_enabled = true

single_page_application = {
redirect_uris = [
Expand All @@ -55,4 +55,4 @@ azuread_applications = {
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
global_settings = {
default_region = "region1"
regions = {
region1 = "australiaeast"
}
random_length = 5
}

azuread_applications = {
test_client = {
useprefix = true
application_name = "test-client"
public_client = {
redirect_uris = ["http://localhost:8080"]
}
}
}
8 changes: 7 additions & 1 deletion modules/azuread/applications_v1/azuread_application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "azuread_application" "app" {
group_membership_claims = try(var.settings.group_membership_claims, ["All"])
identifier_uris = try(var.settings.identifier_uris, null)
prevent_duplicate_names = try(var.settings.prevent_duplicate_names, false)
fallback_public_client_enabled = try(var.settings.public_client, false)
fallback_public_client_enabled = try(var.settings.fallback_public_client_enabled, false)

dynamic "single_page_application" {
for_each = try(var.settings.single_page_application, null) != null ? [1] : []
Expand Down Expand Up @@ -123,6 +123,12 @@ resource "azuread_application" "app" {
}
}
}
dynamic "public_client" {
for_each = try(var.settings.public_client, null) != null ? [var.settings.public_client] : []
content {
redirect_uris = try(public_client.value.redirect_uris, null)
}
}
}

resource "random_uuid" "app_role_id" {
Expand Down

0 comments on commit c54343c

Please sign in to comment.