Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-8225

Add end-user schema retrieval endpoint

    XMLWordPrintable

    Details

      Description

      Add a new action to the end-user service created in OPENIDM-8224 that will return the managed/user schema (or the schema configured as the identity resource) but sanitized for end-user consumption. This means that only the schema attributes themselves should be returned (with their properties), properly ordered.

      A required parameter to this action is "identityResourceUri" which identifies the schema the requestor is interested in.

      Out of the entirety of managed.json, a request for the schema of managed/user should return something like the following:

      {
                      "id" : "http://jsonschema.net",
                      "title" : "User",
                      "icon" : "fa-user",
                      "viewable" : true,
                      "$schema" : "http://json-schema.org/draft-03/schema",
                      "order" : [
                          "_id",
                          "userName",
                          ...
                          "preferences",
                          "termsAccepted"
                      ],
                      "properties" : {
                          "_id" : {
                              "type" : "string",
                              "viewable" : false,
                              "searchable" : false,
                              "userEditable" : false,
                              "policies" : [
                                  {
                                      "policyId" : "cannot-contain-characters",
                                      "params" : {
                                          "forbiddenChars" : [
                                              "/"
                                          ]
                                      }
                                  }
                              ]
                          },
                          "preferences" : {
                              "title" : "Preferences",
                              "viewable" : true,
                              "searchable" : false,
                              "userEditable" : true,
                              "type" : "object",
                              "properties" : {
                                  "updates" : {
                                      "description" : "Send me news and updates",
                                      "type" : "boolean"
                                  },
                                  "marketing": {
                                      "description" : "Send me special offers and services",
                                      "type" : "boolean"
                                  }
                              },
                              "order": [
                                  "updates",
                                  "marketing"
                              ],
                              "required": []
                          },
                          "userName" : {
                              "title" : "Username",
                              "viewable" : true,
                              "type" : "string",
                              "searchable" : true,
                              "userEditable" : true,
                              "minLength" : 1,
                              "policies" : [
                                  {
                                      "policyId" : "unique"
                                  },
                                  {
                                      "policyId" : "no-internal-user-conflict"
                                  },
                                  {
                                      "policyId" : "cannot-contain-characters",
                                      "params" : {
                                          "forbiddenChars" : [
                                              "/"
                                          ]
                                      }
                                  }
                              ]
                          },
                          "termsAccepted" : {
                              "title" : "Terms Accepted",
                              "type" : "object",
                              "viewable" : true,
                              "searchable" : false,
                              "userEditable" : true,
                              "properties" : {
                                  "termsVersion" : {
                                      "title" : "",
                                      "type" : "string",
                                      "viewable" : true,
                                      "userEditable" : false
                                  },
                                  "iso8601date" : {
                                      "title" : "",
                                      "type" : "string",
                                      "viewable" : true,
                                      "userEditable" : false
                                  }
                              },
                              "order" : [
                                  "termsVersion",
                                  "iso8601date"
                              ],
                              "description" : "",
                              "returnByDefault" : true,
                              "isVirtual" : false,
                              "required" : [ ]
                          }
                      },
                      "type" : "object",
                      "required" : [
                          "userName",
                          "givenName",
                          "sn",
                          "mail"
                      ]
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jbranch Jon Branch
              Reporter:
              jbranch Jon Branch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: