diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/Constant.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/Constant.java index f11486543a..da74510855 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/Constant.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.api.server.claim.management.common/src/main/java/org/wso2/carbon/identity/api/server/claim/management/common/Constant.java @@ -284,4 +284,5 @@ public String toString() { public static final String PROP_REQUIRED = "Required"; public static final String PROP_SUPPORTED_BY_DEFAULT = "SupportedByDefault"; public static final String PROP_UNIQUENESS_SCOPE = "UniquenessScope"; + public static final String PROP_PROFILES_PREFIX = "Profiles."; } diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/AttributeProfileDTO.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/AttributeProfileDTO.java new file mode 100644 index 0000000000..4ba315a670 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/AttributeProfileDTO.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto; + +import io.swagger.annotations.*; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +@ApiModel(description = "Attribute profile.") +public class AttributeProfileDTO { + + @Valid + private Boolean readOnly = null; + + @Valid + private Boolean required = null; + + @Valid + private Boolean supportedByDefault = null; + + /** + **/ + @ApiModelProperty(value = "Specifies if the claim is read-only in given profile.") + @JsonProperty("readOnly") + public Boolean getReadOnly() { + return readOnly; + } + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; + } + + /** + **/ + @ApiModelProperty(value = "Specifies if the claim is required in given profile.") + @JsonProperty("required") + public Boolean getRequired() { + return required; + } + public void setRequired(Boolean required) { + this.required = required; + } + + /** + **/ + @ApiModelProperty(value = "Specifies if the claim will be displayed on the given profile.") + @JsonProperty("supportedByDefault") + public Boolean getSupportedByDefault() { + return supportedByDefault; + } + public void setSupportedByDefault(Boolean supportedByDefault) { + this.supportedByDefault = supportedByDefault; + } + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class AttributeProfileDTO {\n"); + + sb.append(" readOnly: ").append(readOnly).append("\n"); + sb.append(" required: ").append(required).append("\n"); + sb.append(" supportedByDefault: ").append(supportedByDefault).append("\n"); + + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimReqDTO.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimReqDTO.java index 3ce51dd684..1dd19066a2 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimReqDTO.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimReqDTO.java @@ -1,17 +1,19 @@ /* - * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2021-2025, WSO2 LLC. (http://www.wso2.com). * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto; @@ -20,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.AttributeMappingDTO; +import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ProfilesDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.PropertyDTO; import io.swagger.annotations.*; import com.fasterxml.jackson.annotation.*; @@ -80,6 +83,9 @@ public enum SharedProfileValueResolvingMethodEnum { @Valid private List properties = new ArrayList(); + @Valid + private ProfilesDTO profiles = null; + /** * A unique URI specific to the claim. **/ @@ -226,6 +232,17 @@ public void setProperties(List properties) { this.properties = properties; } + /** + **/ + @ApiModelProperty(value = "Define any attribute profiles.") + @JsonProperty("profiles") + public ProfilesDTO getProfiles() { + return profiles; + } + public void setProfiles(ProfilesDTO profiles) { + this.profiles = profiles; + } + @Override public String toString() { @@ -244,6 +261,7 @@ public String toString() { sb.append(" sharedProfileValueResolvingMethod: ").append(sharedProfileValueResolvingMethod).append("\n"); sb.append(" attributeMapping: ").append(attributeMapping).append("\n"); sb.append(" properties: ").append(properties).append("\n"); + sb.append(" profiles: ").append(profiles).append("\n"); sb.append("}\n"); return sb.toString(); diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimResDTO.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimResDTO.java index aebc53bc29..8775271692 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimResDTO.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/LocalClaimResDTO.java @@ -1,17 +1,19 @@ /* - * Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * Copyright (c) 2021-2025, WSO2 LLC. (http://www.wso2.com). * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ package org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto; @@ -21,6 +23,7 @@ import java.util.List; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.AttributeMappingDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ClaimResDTO; +import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ProfilesDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.PropertyDTO; import io.swagger.annotations.*; import com.fasterxml.jackson.annotation.*; @@ -83,6 +86,9 @@ public enum SharedProfileValueResolvingMethodEnum { @Valid private List properties = new ArrayList(); + @Valid + private ProfilesDTO profiles = null; + /** * claim ID. **/ @@ -253,6 +259,18 @@ public void setProperties(List properties) { this.properties = properties; } + /** + * Define attribute profiles. + **/ + @ApiModelProperty(value = "Define any attribute profiles.") + @JsonProperty("profiles") + public ProfilesDTO getProfiles() { + return profiles; + } + public void setProfiles(ProfilesDTO profiles) { + this.profiles = profiles; + } + @Override public String toString() { @@ -274,6 +292,7 @@ public String toString() { sb.append(" sharedProfileValueResolvingMethod: ").append(sharedProfileValueResolvingMethod).append("\n"); sb.append(" attributeMapping: ").append(attributeMapping).append("\n"); sb.append(" properties: ").append(properties).append("\n"); + sb.append(" profiles: ").append(profiles).append("\n"); sb.append("}\n"); return sb.toString(); diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/ProfilesDTO.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/ProfilesDTO.java new file mode 100644 index 0000000000..b84fc79a51 --- /dev/null +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/dto/ProfilesDTO.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + * + * WSO2 LLC. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto; + +import io.swagger.annotations.ApiModel; +import java.util.HashMap; +import java.util.Map; +import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.AttributeProfileDTO; +import io.swagger.annotations.*; +import com.fasterxml.jackson.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; + +/** +* Attribute profiles. +**/ +@ApiModel(description = "Attribute profiles.") +public class ProfilesDTO extends HashMap { + + private static final long serialVersionUID = -227086223053735979L; + + @Override + public String toString() { + + StringBuilder sb = new StringBuilder(); + sb.append("class ProfilesDTO {\n"); + sb.append(" " + super.toString()).append("\n"); + + + sb.append("}\n"); + return sb.toString(); + } +} diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/core/ServerClaimManagementService.java b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/core/ServerClaimManagementService.java index 61af60e610..0d612ee9fd 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/core/ServerClaimManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/claim/management/v1/core/ServerClaimManagementService.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; @@ -48,6 +49,7 @@ import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementUtil; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.AttributeMappingDTO; +import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.AttributeProfileDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ClaimDialectReqDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ClaimDialectResDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ClaimResDTO; @@ -56,6 +58,7 @@ import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.LinkDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.LocalClaimReqDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.LocalClaimResDTO; +import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.ProfilesDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.dto.PropertyDTO; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.model.ClaimDialectConfiguration; import org.wso2.carbon.identity.rest.api.server.claim.management.v1.model.ClaimErrorDTO; @@ -78,6 +81,7 @@ import java.util.Arrays; import java.util.Base64; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; @@ -131,6 +135,7 @@ import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_DESCRIPTION; import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_DISPLAY_NAME; import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_DISPLAY_ORDER; +import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_PROFILES_PREFIX; import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_READ_ONLY; import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_REG_EX; import static org.wso2.carbon.identity.api.server.claim.management.common.Constant.PROP_REQUIRED; @@ -481,10 +486,10 @@ public void updateLocalClaim(String claimId, LocalClaimReqDTO localClaimReqDTO) /** * Updates a claim dialect with related claims from an uploaded file. * - * @param fileInputStream InputStream representing the uploaded claim dialect file. - * @param fileDetail Attachment object with metadata about the uploaded claim dialect file. - * @param preserveClaims Boolean value to indicate whether to merge and preserve the existing claims - * or completely replace the existing claims set. + * @param fileInputStream InputStream representing the uploaded claim dialect file. + * @param fileDetail Attachment object with metadata about the uploaded claim dialect file. + * @param preserveClaims Boolean value to indicate whether to merge and preserve the existing claims + * or completely replace the existing claims set. * @return a String representing the updated claim dialect's resource identifier. */ public String updateClaimDialectFromFile(InputStream fileInputStream, Attachment fileDetail, @@ -1030,6 +1035,8 @@ private LocalClaimResDTO getLocalClaimResDTO(LocalClaim localClaim) { } } + addAttributeProfilesToLocalClaimResponse(claimProperties, localClaimResDTO); + String sharedProfileValueResolvingMethod = claimProperties.remove(ClaimConstants.SHARED_PROFILE_VALUE_RESOLVING_METHOD); if (StringUtils.isNotBlank(sharedProfileValueResolvingMethod)) { @@ -1058,6 +1065,62 @@ private LocalClaimResDTO getLocalClaimResDTO(LocalClaim localClaim) { return localClaimResDTO; } + /** + * Add attribute profiles to LocalClaimResDTO. + * + * @param claimProperties Claim properties. + * @param localClaimResDTO Local claim response DTO. + */ + private void addAttributeProfilesToLocalClaimResponse(Map claimProperties, + LocalClaimResDTO localClaimResDTO) { + + if (MapUtils.isEmpty(claimProperties)) { + return; + } + ProfilesDTO attributeProfiles = new ProfilesDTO(); + Iterator> claimPropertyIterator = claimProperties.entrySet().iterator(); + + while (claimPropertyIterator.hasNext()) { + Map.Entry property = claimPropertyIterator.next(); + String propertyKey = property.getKey(); + String propertyValue = property.getValue(); + + if (StringUtils.isBlank(propertyKey) || StringUtils.isBlank(propertyValue)) { + continue; + } + if (!StringUtils.startsWithIgnoreCase(propertyKey, PROP_PROFILES_PREFIX)) { + continue; + } + String[] propertyKeyArray = propertyKey.split("\\."); + if (propertyKeyArray.length != 3) { + continue; + } + String profileName = propertyKeyArray[1]; + String claimPropertyName = propertyKeyArray[2]; + + AttributeProfileDTO profileAttributes = + attributeProfiles.computeIfAbsent(profileName, k -> new AttributeProfileDTO()); + + switch (claimPropertyName) { + case PROP_READ_ONLY: + claimPropertyIterator.remove(); + profileAttributes.setReadOnly(Boolean.valueOf(propertyValue)); + break; + case PROP_REQUIRED: + claimPropertyIterator.remove(); + profileAttributes.setRequired(Boolean.valueOf(propertyValue)); + break; + case PROP_SUPPORTED_BY_DEFAULT: + claimPropertyIterator.remove(); + profileAttributes.setSupportedByDefault(Boolean.valueOf(propertyValue)); + break; + default: + break; + } + } + localClaimResDTO.setProfiles(attributeProfiles); + } + private List getLocalClaimResDTOs(List localClaimList) { List localClaimResDTOList = new ArrayList<>(); @@ -1100,6 +1163,8 @@ private LocalClaim createLocalClaim(LocalClaimReqDTO localClaimReqDTO) { String.valueOf(localClaimReqDTO.getSharedProfileValueResolvingMethod())); } + addAttributeProfilesToClaimProperties(localClaimReqDTO.getProfiles(), claimProperties); + claimProperties.put(PROP_READ_ONLY, String.valueOf(localClaimReqDTO.getReadOnly())); claimProperties.put(PROP_REQUIRED, String.valueOf(localClaimReqDTO.getRequired())); claimProperties.put(PROP_SUPPORTED_BY_DEFAULT, String.valueOf(localClaimReqDTO.getSupportedByDefault())); @@ -1114,6 +1179,36 @@ private LocalClaim createLocalClaim(LocalClaimReqDTO localClaimReqDTO) { return new LocalClaim(localClaimReqDTO.getClaimURI(), attributeMappings, claimProperties); } + /** + * Add profile attributes to claim properties. + * + * @param attributeProfiles - Profile attributes. + * @param claimProperties - Claim properties. + */ + private void addAttributeProfilesToClaimProperties(Map attributeProfiles, + Map claimProperties) { + + if (MapUtils.isEmpty(attributeProfiles)) { + return; + } + attributeProfiles.forEach((profileName, profileAttributes) -> { + addProfileAttributeValue(claimProperties, profileName, PROP_READ_ONLY, profileAttributes.getReadOnly()); + addProfileAttributeValue(claimProperties, profileName, PROP_REQUIRED, profileAttributes.getRequired()); + addProfileAttributeValue(claimProperties, profileName, PROP_SUPPORTED_BY_DEFAULT, + profileAttributes.getSupportedByDefault()); + }); + } + + private void addProfileAttributeValue(Map claimProperties, String profileName, String propertyKey, + Object propertyValue) { + + if (propertyValue == null) { + return; + } + String claimPropertyKey = PROP_PROFILES_PREFIX + profileName + "." + propertyKey; + claimProperties.put(claimPropertyKey, String.valueOf(propertyValue)); + } + /** * Import a claim dialect with related claims from an uploaded file. * diff --git a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/resources/claim-management.yaml b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/resources/claim-management.yaml index d27bb41d03..ad3e2fe692 100644 --- a/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/resources/claim-management.yaml +++ b/components/org.wso2.carbon.identity.api.server.claim.management/org.wso2.carbon.identity.rest.api.server.claim.management.v1/src/main/resources/claim-management.yaml @@ -762,6 +762,8 @@ definitions: description: Define any additional properties if required. items: $ref: '#/definitions/Property' + profiles: + $ref: '#/definitions/Profiles' #----------------------------------------------------- # The Local Claim Response object @@ -838,6 +840,8 @@ definitions: description: Define any additional properties if required. items: $ref: '#/definitions/Property' + profiles: + $ref: '#/definitions/Profiles' #----------------------------------------------------- # The Additional Attribute Mapping object @@ -948,6 +952,41 @@ definitions: items: $ref: '#/definitions/Property' + #----------------------------------------------------- + # Profiles Object + #----------------------------------------------------- + Profiles: + type: object + description: Attribute profiles. + additionalProperties: + $ref: '#/definitions/AttributeProfile' + example: + console: + readOnly: false + required: true + supportedByDefault: true + endUser: + readOnly: false + required: false + supportedByDefault: true + selfRegister: + readOnly: true + required: false + supportedByDefault: false + + AttributeProfile: + type: object + properties: + readOnly: + type: boolean + example: false + required: + type: boolean + example: false + supportedByDefault: + type: boolean + example: true + #----------------------------------------------------- # Property Object #-----------------------------------------------------