@@ -40,6 +40,8 @@ func flattenConnectionOptions(d ResourceData, options interface{}) []interface{}
4040 m = flattenConnectionOptionsAD (o )
4141 case * management.ConnectionOptionsAzureAD :
4242 m = flattenConnectionOptionsAzureAD (o )
43+ case * management.ConnectionOptionsADFS :
44+ m = flattenConnectionOptionsADFS (o )
4345 case * management.ConnectionOptionsSAML :
4446 m = flattenConnectionOptionsSAML (o )
4547 }
@@ -250,6 +252,18 @@ func flattenConnectionOptionsAzureAD(o *management.ConnectionOptionsAzureAD) int
250252 }
251253}
252254
255+ func flattenConnectionOptionsADFS (o * management.ConnectionOptionsADFS ) interface {} {
256+ return map [string ]interface {}{
257+ "tenant_domain" : o .GetTenantDomain (),
258+ "domain_aliases" : o .DomainAliases ,
259+ "icon_url" : o .GetLogoURL (),
260+ "adfs_server" : o .GetADFSServer (),
261+ "api_enable_users" : o .GetEnableUsersAPI (),
262+ "set_user_root_attributes" : o .GetSetUserAttributes (),
263+ "non_persistent_attrs" : o .GetNonPersistentAttrs (),
264+ }
265+ }
266+
253267func flattenConnectionOptionsSAML (o * management.ConnectionOptionsSAML ) interface {} {
254268 return map [string ]interface {}{
255269 "signing_cert" : o .GetSigningCert (),
@@ -323,6 +337,8 @@ func expandConnection(d ResourceData) *management.Connection {
323337 c .Options = expandConnectionOptionsEmail (d )
324338 case management .ConnectionStrategySAML :
325339 c .Options = expandConnectionOptionsSAML (d )
340+ case management .ConnectionStrategyADFS :
341+ c .Options = expandConnectionOptionsADFS (d )
326342 default :
327343 log .Printf ("[WARN]: Unsupported connection strategy %s" , s )
328344 log .Printf ("[WARN]: Raise an issue with the auth0 provider in order to support it:" )
@@ -666,6 +682,18 @@ func expandConnectionOptionsSAML(d ResourceData) *management.ConnectionOptionsSA
666682 return o
667683}
668684
685+ func expandConnectionOptionsADFS (d ResourceData ) * management.ConnectionOptionsADFS {
686+ return & management.ConnectionOptionsADFS {
687+ TenantDomain : String (d , "tenant_domain" ),
688+ DomainAliases : Slice (d , "domain_aliases" ),
689+ LogoURL : String (d , "icon_url" ),
690+ ADFSServer : String (d , "adfs_server" ),
691+ EnableUsersAPI : Bool (d , "api_enable_users" ),
692+ SetUserAttributes : String (d , "set_user_root_attributes" ),
693+ NonPersistentAttrs : castToListOfStrings (Set (d , "non_persistent_attrs" ).List ()),
694+ }
695+ }
696+
669697type scoper interface {
670698 Scopes () []string
671699 SetScopes (enable bool , scopes ... string )
0 commit comments