@@ -40,6 +40,8 @@ func flattenConnectionOptions(d ResourceData, options interface{}) []interface{}
40
40
m = flattenConnectionOptionsAD (o )
41
41
case * management.ConnectionOptionsAzureAD :
42
42
m = flattenConnectionOptionsAzureAD (o )
43
+ case * management.ConnectionOptionsADFS :
44
+ m = flattenConnectionOptionsADFS (o )
43
45
case * management.ConnectionOptionsSAML :
44
46
m = flattenConnectionOptionsSAML (o )
45
47
}
@@ -250,6 +252,18 @@ func flattenConnectionOptionsAzureAD(o *management.ConnectionOptionsAzureAD) int
250
252
}
251
253
}
252
254
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
+
253
267
func flattenConnectionOptionsSAML (o * management.ConnectionOptionsSAML ) interface {} {
254
268
return map [string ]interface {}{
255
269
"signing_cert" : o .GetSigningCert (),
@@ -323,6 +337,8 @@ func expandConnection(d ResourceData) *management.Connection {
323
337
c .Options = expandConnectionOptionsEmail (d )
324
338
case management .ConnectionStrategySAML :
325
339
c .Options = expandConnectionOptionsSAML (d )
340
+ case management .ConnectionStrategyADFS :
341
+ c .Options = expandConnectionOptionsADFS (d )
326
342
default :
327
343
log .Printf ("[WARN]: Unsupported connection strategy %s" , s )
328
344
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
666
682
return o
667
683
}
668
684
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
+
669
697
type scoper interface {
670
698
Scopes () []string
671
699
SetScopes (enable bool , scopes ... string )
0 commit comments