README
Sample 7 - Scripting a SCIM-like Schema
---------------------------------------
Copyright (c) 2012 ForgeRock AS
This work is licensed under a Creative Commons Attribution-
NonCommercial-NoDerivs 3.0 Unported License. See
http://creativecommons.org/licenses/by-nc-nd/3.0/
This sample demonstrates using scripting to expose users according to a
SCIM-like schema.
For documentation pertaining to this example see:
http://openidm.forgerock.org/doc/install-guide/index.html#more-sample7
To try the sample, follow these steps.
1. Start OpenIDM with the configuration for sample 7.
$ cd /path/to/openidm
$ ./startup.sh samples/sample7
2. Run reconciliation to copy the user from the XML file under data/ to
the OpenIDM internal repository.
$ curl -k --header "Content-type: application/json" -u "openidm-admin:openidm-admin" -X POST "https://localhost:8443/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
3. Retrieve the user from the repository. The scripts you copied transform
the user data to fit the SCIM-like schema.
$ curl -k -u "openidm-admin:openidm-admin" --request GET "https://localhost:8443/openidm/managed/user/DDOE1"
{
"schemas": "['urn:scim:schemas:core:1.0']",
"ims": [
{
"value": "jonyOnAim",
"type": "aim"
},
{
"value": "skyperHiasl",
"type": "skype"
}
],
"locale": null,
"phoneNumbers": [
{
"value": "1234567",
"type": "work"
},
{
"value": "1234568",
"type": "home"
}
],
"emails": [
{
"type": "work",
"value": "hallo@example.com",
"primary": true
},
{
"value": "jdoe@forgerock.com",
"type": "home"
}
],
"externalId": "DDOE1",
"preferredLanguage": "en_US",
"meta": {
"lastModified": "Mon May 28 2012 12:45:45 GMT+0200 (CEST)"
},
"userType": "permanent",
"_rev": "0",
"photos": [
{
"value": "https://photos.example.com/profilephoto/72930000000Ccne/F",
"type": "photo"
},
{
"value": "https://photos.example.com/profilephoto/72930000000Ccne/T",
"type": "thumbnail"
}
],
"title": "Mr.Univers",
"timezone": "America/Denver",
"_id": "DDOE1",
"profileUrl": "https://login.example.com/DDOE1",
"nickName": "Jonny",
"name": {
"familyName": "Doe",
"middleName": "Hias",
"formatted": "Dr. John H Doe III",
"givenName": "John",
"honorificSuffix": "III",
"honorificPrefix": "Dr."
},
"userName": "DDOE1",
"displayName": "John Doe",
"addresses": [
{
"streetAddress": "100 Universal City Plaza",
"region": "CA",
"formatted": "100 Universal City Plaza\nHollywood, CA 91608 USA",
"postalCode": "91608",
"primary": "true",
"locality": "Hollywood",
"type": "work",
"country": "USA"
},
{
"streetAddress": "222 Universal City Plaza",
"region": "CA",
"formatted": "222 Universal City Plaza\nHollywood, CA 91622 USA",
"postalCode": "91622",
"primary": "false",
"locality": "Hollywood",
"type": "home",
"country": "USA"
}
],
"groups": [
{
"value": "usemploys",
"display": "US Employees"
},
{
"value": "euemploys",
"display": "EU Employees"
}
]
}