From 8bb1a7d0e3afbf8bb6cfa95f27b56c48263d1eee Mon Sep 17 00:00:00 2001 From: Christopher Nellis Date: Tue, 10 Dec 2024 21:50:04 -0500 Subject: [PATCH] Add authentication methods to 'options' block --- internal/auth0/connection/schema.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/internal/auth0/connection/schema.go b/internal/auth0/connection/schema.go index debfc872..481c4694 100644 --- a/internal/auth0/connection/schema.go +++ b/internal/auth0/connection/schema.go @@ -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, @@ -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}, @@ -1102,3 +1129,4 @@ var optionsSchema = &schema.Schema{ }, }, } +