diff --git a/schemas/context/identityitem.schema.json b/schemas/context/identityitem.schema.json new file mode 100644 index 0000000000..886757fe64 --- /dev/null +++ b/schemas/context/identityitem.schema.json @@ -0,0 +1,54 @@ +{ + "meta:license": [ + "Copyright 2017 Adobe Systems Incorporated. All rights reserved.", + "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", + "you may not use this file except in compliance with the License. You may obtain a copy", + "of the License at https://creativecommons.org/licenses/by/4.0/" + ], + "$id": "https://ns.adobe.com/xdm/context/identityitem", + "$schema": "http://json-schema.org/draft-06/schema#", + "title": "Identity Item", + "type": "object", + "meta:extensible": true, + "description": + "An end-user identity item, to be included in an instance of `context/identitymap`", + "definitions": { + "identityitem": { + "properties": { + "xdm:id": { + "title": "Identifier", + "type": "string", + "description": "Identity of the consumer in the related namespace." + }, + "xdm:authenticatedState": { + "description": + "The state this identity is authenticated as for this observed ExperienceEvent.", + "type": "string", + "default": "ambiguous", + "enum": ["ambiguous", "authenticated", "loggedOut"], + "meta:enum": { + "ambiguous": "Ambiguous", + "authenticated": "User identified by a login or simular action that was valid at the time of the event observation.", + "loggedOut": "User was identified by a login action at some point of time previously, but is not currently logged in." + } + }, + "xdm:primary": { + "title": "Primary", + "type": "boolean", + "default": false, + "description": + "Indicates this identity is the preferred identity. Is used as a hint to help systems better organize how identities are queried." + } + } + } + }, + "allOf": [ + { + "$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context" + }, + { + "$ref": "#/definitions/identityitem" + } + ], + "meta:status": "experimental" +} diff --git a/schemas/context/identitymap.schema.json b/schemas/context/identitymap.schema.json index 0688c7e434..f500d1efa0 100644 --- a/schemas/context/identitymap.schema.json +++ b/schemas/context/identitymap.schema.json @@ -1,39 +1,29 @@ { "meta:license": [ - "Copyright 2018 Adobe Systems Incorporated. All rights reserved.", + "Copyright 2017 Adobe Systems Incorporated. All rights reserved.", "This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", "you may not use this file except in compliance with the License. You may obtain a copy", "of the License at https://creativecommons.org/licenses/by/4.0/" ], "$id": "https://ns.adobe.com/xdm/context/identitymap", "$schema": "http://json-schema.org/draft-06/schema#", - "title": "Profile", + "title": "IdentityMap", "type": "object", - "auditable": true, "meta:extensible": true, - "meta:intendedToExtend": ["https://ns.adobe.com/xdm/context/profile", "https://ns.adobe.com/xdm/context/pexperienceevent"], - "description": - "End User identity assertions.", + "meta:intendedToExtend": ["https://ns.adobe.com/xdm/context/profile", "https://ns.adobe.com/xdm/context/experienceevent"], + "description": "Defines a map containing a set of end user identities, keyed on either namespace integration code or the namespace ID of the identity. The values of the map are an array, meaning that more than one identity of each namespace may be carried.", "definitions": { "identitymap": { - "properties": { - "xdm:identities": { - "title": "All User Identities", - "type": "array", - "items": { - "$ref": "https://ns.adobe.com/xdm/context/identity" - }, - "minItems": 1, - "description": - "Array of Identities. Condensed, normalized encapsulation of all end user identifiers." + "meta:xdmType": "map", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "https://ns.adobe.com/xdm/context/identityitem" } } } }, "allOf": [ - { - "$ref": "https://ns.adobe.com/xdm/common/extensible#/definitions/@context" - }, { "$ref": "#/definitions/identitymap" }