Skip to content

Commit

Permalink
Add authentication methods to 'options' block
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisnellis committed Dec 11, 2024
1 parent 9dc3b24 commit 8bb1a7d
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions internal/auth0/connection/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,28 @@ var resourceSchema = map[string]*schema.Schema{
"options": optionsSchema,
}

var authMethodEnabled = map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Optional: false,
Description: "Whether the authentication method is enabled or not"
}
}

var authMethods = map[string]*schema.Schema{
"password": {
Type: schema.authMethodEnabled,
Optional: false,
Description: "Controls if password authentication is enabled for this connection"
},
"passkey": {
Type: schema.authMethodEnabled,
Optional: false,
Description: "Controls if passkey authentication is enabled for this connection. See"
}
}


var optionsSchema = &schema.Schema{
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -252,6 +274,11 @@ var optionsSchema = &schema.Schema{
Optional: true,
Description: "A map of scripts used to integrate with a custom database.",
},
"authentication_methods": {
Type: schema.authMethods,
Optional: true,
Description: "Enables and disables authentication methods for this database",
},
"scripts": {
Type: schema.TypeMap,
Elem: &schema.Schema{Type: schema.TypeString},
Expand Down Expand Up @@ -1102,3 +1129,4 @@ var optionsSchema = &schema.Schema{
},
},
}

0 comments on commit 8bb1a7d

Please sign in to comment.