Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • url parameter describes the URL where backend is situated. This URL can be a HTTPS address if the issuer of the server certificate is trusted by the Java execution environment.
  • timeout parameter describes if and how long the timeout should be for the request before showing an error message.
  • defaultparams parameter describes the list of static parameters that are sent to the backend in every request. The key uses JSON object notation.
  • langcode parameter describes the parameter which is the name of the language code parameter in the request.
  • statuscode parameter describes where the status code is in response, there are two modes of configuration: xpath and http-header of which xpath is the default behavior. When using the xpath mode, all HTTP codes other than 200 will result in an error condition. When using http-header mode, it is possible to use the HTTP status code or message as a key for the statusmapping parameter. For example, consider the fragment "statuscode": "/path/to/status", this will be interpreted similarly as "statuscode" : { "xpath" : "/path/to/status" }. If you wish to use the HTTP status code in conjunction with statusmapping, then you should use the configuration "statuscode" : { "http-header" : "status:code" }, or if you wish to map the HTTP status message you should define "statuscode" : { "http-header" : "status:message" }.
  • statusmapping parameter maps the status code value in response to a result action in Ubisecure CustomerID. Left side of each mapping corresponds to the value returned by backend while right side corresponds to values used to guide Ubisecure CustomerID actions. OK means that registration is continued, ERROR means that an error message is shown in the current wizard step and STOP means that registration is stopped and user is redirected to an error page with an error message. The key uses JSON object notation.
  • username and password parameters describe the credentials used in the HTTP Basic Authentication. These parameters are optional. If they are not included, HTTP Basic Authentication is not used.
  • method parameter describes the HTTP method used in the request. This parameter is optional and if not specified, GET will be used as default.
  • message parameter describes what messages are shown to the user depending on the backend response. Each map specifies how the message will be produced based on the status code of the response. All of the four parameters must be specified for each mapping.
    • status-code: Specifying the HTTP status code on which the mapping is based on. Possible values:
      • HTTP status code, for instance 404 or 500.
      • "*": Corresponds to all the response status codes that can't be mapped to a specific status code in the configuration.
    • body-or-header: Whether the message will be based on content found in the HTTP header or the actual HTTP XML message content. Possible values:
      • body
      • header
    • location: The location where the message will be searched for. Possible values:
      • XPath addressing the message location in the XML response. Can be used only if the body-or-header is set to body.
      • code: The message will be read from the status code of the HTTP header. Can be used only the body-or-header is set to header.
      • message: The message will be read from the message of the HTTP header. Can be used only the body-or-header is set to header.
    • use-as-key: Defines if the message will be used as is or as a language key value.

      If message is defined to be used as key, then the retrieved message will be interpreted as part of a localization key that will be mapped to a language specific value specified in messages_xx.properties. Addressing the language specific value in the localization file follows the following notation:

      Code Block
      languagetext
      backend.<backend-name>.message.<key value from backend response>


    An example of a message configuration: 

    Code Block
    languagetext
    "message" : \
    [ { "status-code" : "400", "body-or-header" : "body", "location" : "/error/message" } , \
    { "status-code" : "500", "body-or-header" : "body", "location" : "/error/message" } , \
    { "status-code" : "201", "body-or-header" : "header", "location" : "code" } , \
    { "status-code" : "200", "body-or-header" : "header", "location" : "code" } ]


    Note

    NOTE: For backward compatibility, the message parameter can also be a single parameter describing an XPath. In this less versatile configuration, displayed message is always mapped to the value found in the XPath.


...