Skip to content
2 changes: 1 addition & 1 deletion bin/check-operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DIRECTORY="src/main/api/"
OPERATIONS=("create" "update" "delete" "retrieve" "patch")

# Entities/ops to exclude from validation
EXCLUDE_ENTITIES_OPS=("UserConsent-delete" "ApplicationRole-retrieve" "Family-delete" "Family-patch" "Family-retrieve" "EntityTypePermission-retrieve" "ApplicationRole-retrieve" "GroupMembers-retrieve" "GroupMembers-patch" "UserLink-patch" "UserLink-update" "AuditLog-delete" "AuditLog-patch" "AuditLog-update")
EXCLUDE_ENTITIES_OPS=("UserConsent-delete" "ApplicationRole-retrieve" "Family-delete" "Family-patch" "Family-retrieve" "EntityTypePermission-retrieve" "ApplicationRole-retrieve" "GroupMembers-retrieve" "GroupMembers-patch" "UserLink-patch" "UserLink-update" "AuditLog-delete" "AuditLog-patch" "AuditLog-update" "TenantManagerIdentityProviderTypeConfiguration-retrieve")


# Function to check if an entity is in the exclude list
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"uri": "/api/tenant-manager/identity-provider",
"comments": [
"Creates a tenant manager identity provider type configuration for the given identity provider type."
],
"method": "post",
"methodName": "createTenantManagerIdentityProviderTypeConfiguration",
"successResponse": "TenantManagerIdentityProviderTypeConfigurationResponse",
"errorResponse": "Errors",
"params": [
{
"name": "type",
"comments": [
"The type of the identity provider."
],
"type": "urlSegment",
"javaType": "IdentityProviderType"
},
{
"name": "request",
"comments": [
"The request object that contains all the information used to create the tenant manager identity provider type configuration."
],
"type": "body",
"javaType": "TenantManagerIdentityProviderTypeConfigurationRequest"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"uri": "/api/tenant-manager/identity-provider",
"comments": [
"Deletes the tenant manager identity provider type configuration for the given identity provider type."
],
"method": "delete",
"methodName": "deleteTenantManagerIdentityProviderTypeConfiguration",
"successResponse": "Void",
"errorResponse": "Errors",
"params": [
{
"name": "type",
"comments": [
"The type of the identity provider."
],
"type": "urlSegment",
"javaType": "IdentityProviderType"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"uri": "/api/tenant-manager/identity-provider",
"comments": [
"Patches the tenant manager identity provider type configuration for the given identity provider type."
],
"method": "patch",
"methodName": "patchTenantManagerIdentityProviderTypeConfiguration",
"successResponse": "TenantManagerIdentityProviderTypeConfigurationResponse",
"errorResponse": "Errors",
"params": [
{
"name": "type",
"comments": [
"The type of the identity provider."
],
"type": "urlSegment",
"javaType": "IdentityProviderType"
},
{
"name": "request",
"comments": [
"The request object that contains the new tenant manager identity provider type configuration information."
],
"type": "body",
"javaType": "TenantManagerIdentityProviderTypeConfigurationRequest"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"uri": "/api/tenant-manager/identity-provider",
"comments": [
"Updates the tenant manager identity provider type configuration for the given identity provider type."
],
"method": "put",
"methodName": "updateTenantManagerIdentityProviderTypeConfiguration",
"successResponse": "TenantManagerIdentityProviderTypeConfigurationResponse",
"errorResponse": "Errors",
"params": [
{
"name": "type",
"comments": [
"The type of the identity provider."
],
"type": "urlSegment",
"javaType": "IdentityProviderType"
},
{
"name": "request",
"comments": [
"The request object that contains the updated tenant manager identity provider type configuration."
],
"type": "body",
"javaType": "TenantManagerIdentityProviderTypeConfigurationRequest"
}
]
}
4 changes: 3 additions & 1 deletion src/main/client/go.client.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,16 @@ func (c *FusionAuthClient) ${api.methodName?cap_first}WithContext(ctx context.Co
WithAuthorization(${api.authorization}).
[/#if]
[#list api.params![] as param]
[#if param.javaType??][#assign goType = global.convertType(param.javaType, "go")/][/#if]
[#if param.type == "urlSegment"]
[#if !param.constant?? && param.javaType == "Integer"]
WithUriSegment(strconv.Itoa(${(param.constant?? && param.constant)?then(param.value, global.convertValue(param.name, "go"))})).
[#elseif !param.constant?? && goType != "string"]
WithUriSegment(string(${(param.constant?? && param.constant)?then(param.value, global.convertValue(param.name, "go"))})).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was needed to convert the enum to a string for the type URL parameter.

[#else]
WithUriSegment(${(param.constant?? && param.constant)?then(param.value, global.convertValue(param.name, "go"))}).
[/#if]
[#elseif param.type == "urlParameter"]
[#if param.javaType??][#assign goType = global.convertType(param.javaType, "go")/][/#if]
[#if param.value?? && param.value == "true"]
WithParameter("${param.parameterName}", strconv.FormatBool(true)).
[#elseif param.value?? && param.value == "false"]
Expand Down
2 changes: 2 additions & 0 deletions src/main/client/java.client.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ import io.fusionauth.domain.api.report.LoginReportResponse;
import io.fusionauth.domain.api.report.MonthlyActiveUserReportResponse;
import io.fusionauth.domain.api.report.RegistrationReportResponse;
import io.fusionauth.domain.api.report.TotalsReportResponse;
import io.fusionauth.domain.api.tenantManager.TenantManagerIdentityProviderTypeConfigurationRequest;
import io.fusionauth.domain.api.tenantManager.TenantManagerIdentityProviderTypeConfigurationResponse;
import io.fusionauth.domain.api.twoFactor.SecretResponse;
import io.fusionauth.domain.api.twoFactor.TwoFactorLoginRequest;
import io.fusionauth.domain.api.twoFactor.TwoFactorSendRequest;
Expand Down
1 change: 1 addition & 0 deletions src/main/client/netcore.client.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ using io.fusionauth.domain.api.identityProvider;
using io.fusionauth.domain.api.jwt;
using io.fusionauth.domain.api.passwordless;
using io.fusionauth.domain.api.report;
using io.fusionauth.domain.api.tenantManager;
using io.fusionauth.domain.api.twoFactor;
using io.fusionauth.domain.api.user;
using io.fusionauth.domain.oauth2;
Expand Down
1 change: 1 addition & 0 deletions src/main/client/netcore.client.interface.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ using io.fusionauth.domain.api.identityProvider;
using io.fusionauth.domain.api.jwt;
using io.fusionauth.domain.api.passwordless;
using io.fusionauth.domain.api.report;
using io.fusionauth.domain.api.tenantManager;
using io.fusionauth.domain.api.twoFactor;
using io.fusionauth.domain.api.user;
using io.fusionauth.domain.oauth2;
Expand Down
1 change: 1 addition & 0 deletions src/main/client/netcore.client.sync.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ using io.fusionauth.domain.api.identityProvider;
using io.fusionauth.domain.api.jwt;
using io.fusionauth.domain.api.passwordless;
using io.fusionauth.domain.api.report;
using io.fusionauth.domain.api.tenantManager;
using io.fusionauth.domain.api.twoFactor;
using io.fusionauth.domain.api.user;
using io.fusionauth.domain.oauth2;
Expand Down
2 changes: 1 addition & 1 deletion src/main/client/netcore.domain.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
using ${replaceKeywords(package)};
[/#if]
[/#list]
[#if ["DeviceUserCodeResponse", "IdentityProviderLink", "IdentityProviderPendingLinkResponse", "IdentityProviderSearchCriteria", "SAMLv2Configuration"]?seq_contains(domain_item.type)]
[#if ["DeviceUserCodeResponse", "IdentityProviderLink", "IdentityProviderPendingLinkResponse", "IdentityProviderSearchCriteria", "SAMLv2Configuration", "TenantManagerIdentityProviderTypeConfiguration"]?seq_contains(domain_item.type)]
using io.fusionauth.domain.provider;
[/#if]
[#if domain_item.enum?? && (global.needsConverter(domain_item) || global.needsConverterNoArgs(domain_item))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
},
"brandName" : {
"type" : "String"
},
"identityProviderTypeConfigurations" : {
"type" : "Map",
"typeArguments" : [ {
"type" : "String"
}, {
"type" : "TenantManagerIdentityProviderTypeConfiguration"
} ]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packageName" : "io.fusionauth.domain.api.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfigurationRequest",
"description" : "/**\n * The Tenant Manager IdP type configuration request object\n */\n",
"fields" : {
"typeConfiguration" : {
"type" : "TenantManagerIdentityProviderTypeConfiguration"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"packageName" : "io.fusionauth.domain.api.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfigurationResponse",
"description" : "/**\n * The Tenant Manager IdP type configuration response object\n */\n",
"fields" : {
"typeConfiguration" : {
"type" : "TenantManagerIdentityProviderTypeConfiguration"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"packageName" : "io.fusionauth.domain.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfiguration",
"description" : "/**\n * Configuration object for identity provider types allowed in Tenant Manager\n */\n",
"extends" : [ {
"type" : "Enableable"
} ],
"implements" : [ {
"type" : "Buildable",
"typeArguments" : [ {
"type" : "TenantManagerIdentityProviderTypeConfiguration"
} ]
}, {
"type" : "JSONColumnable"
} ],
"fields" : {
"defaultAttributeMappings" : {
"type" : "Map",
"typeArguments" : [ {
"type" : "String"
}, {
"type" : "String"
} ]
},
"insertInstant" : {
"type" : "ZonedDateTime"
},
"lastUpdateInstant" : {
"type" : "ZonedDateTime"
},
"linkingStrategy" : {
"type" : "IdentityProviderLinkingStrategy"
},
"type" : {
"type" : "IdentityProviderType"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,20 @@
"brandName" : {
"className" : "java.lang.String",
"type" : "String"
},
"identityProviderTypeConfigurations" : {
"className" : "java.util.Map",
"type" : "Map",
"typeArguments" : [ {
"className" : "java.lang.String",
"type" : "String"
}, {
"className" : "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration",
"type" : "TenantManagerIdentityProviderTypeConfiguration"
} ]
}
},
"imports" : [ "io.fusionauth.domain.Buildable", "java.util.UUID", "java.lang.String" ],
"imports" : [ "io.fusionauth.domain.Buildable", "java.util.UUID", "java.lang.String", "java.util.Map", "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration" ],
"interfaces" : [ {
"className" : "io.fusionauth.domain.Buildable",
"type" : "Buildable",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"className" : "io.fusionauth.domain.api.tenantManager.TenantManagerIdentityProviderTypeConfigurationRequest",
"extends" : { },
"fields" : {
"typeConfiguration" : {
"className" : "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration",
"type" : "TenantManagerIdentityProviderTypeConfiguration"
}
},
"imports" : [ "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration" ],
"interfaces" : [ ],
"objectType" : "Object",
"packageName" : "io.fusionauth.domain.api.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfigurationRequest"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"className" : "io.fusionauth.domain.api.tenantManager.TenantManagerIdentityProviderTypeConfigurationResponse",
"extends" : { },
"fields" : {
"typeConfiguration" : {
"className" : "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration",
"type" : "TenantManagerIdentityProviderTypeConfiguration"
}
},
"imports" : [ "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration" ],
"interfaces" : [ ],
"objectType" : "Object",
"packageName" : "io.fusionauth.domain.api.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfigurationResponse"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"className" : "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration",
"extends" : {
"className" : "io.fusionauth.domain.Enableable",
"type" : "Enableable"
},
"fields" : {
"data" : {
"className" : "java.util.Map",
"type" : "Map",
"typeArguments" : [ {
"className" : "java.lang.String",
"type" : "String"
}, {
"className" : "java.lang.Object",
"type" : "Object"
} ]
},
"defaultAttributeMappings" : {
"className" : "java.util.Map",
"type" : "Map",
"typeArguments" : [ {
"className" : "java.lang.String",
"type" : "String"
}, {
"className" : "java.lang.String",
"type" : "String"
} ]
},
"insertInstant" : {
"className" : "java.time.ZonedDateTime",
"type" : "ZonedDateTime"
},
"lastUpdateInstant" : {
"className" : "java.time.ZonedDateTime",
"type" : "ZonedDateTime"
},
"linkingStrategy" : {
"className" : "io.fusionauth.domain.provider.IdentityProviderLinkingStrategy",
"type" : "IdentityProviderLinkingStrategy"
},
"type" : {
"className" : "io.fusionauth.domain.provider.IdentityProviderType",
"type" : "IdentityProviderType"
}
},
"imports" : [ "io.fusionauth.domain.Enableable", "io.fusionauth.domain.Buildable", "com.inversoft.mybatis.JSONColumnable", "java.util.Map", "java.lang.String", "java.time.ZonedDateTime", "io.fusionauth.domain.provider.IdentityProviderLinkingStrategy", "io.fusionauth.domain.provider.IdentityProviderType" ],
"interfaces" : [ {
"className" : "io.fusionauth.domain.Buildable",
"type" : "Buildable",
"typeArguments" : [ {
"className" : "io.fusionauth.domain.tenantManager.TenantManagerIdentityProviderTypeConfiguration",
"type" : "TenantManagerIdentityProviderTypeConfiguration"
} ]
}, {
"className" : "com.inversoft.mybatis.JSONColumnable",
"type" : "JSONColumnable"
} ],
"objectType" : "Object",
"packageName" : "io.fusionauth.domain.tenantManager",
"type" : "TenantManagerIdentityProviderTypeConfiguration"
}