Page tree

Are you looking for the latest documentation for the current versions of Nexus' products?

__

Skip to end of metadata
Go to start of metadata

Get authentication images from content provider

Example - Authentication command with remote image data

The authentication command in the Hermod API, POST /rest/command/authenticate, contains a "description" section.

Here is an example: 

Example: visual data in json code
  "authCommand": {
    "params": {
      ... 
      "description": [
        ... 
        {
          "content_type": "image/jpeg",
          "data": "BASE64 ENCODED IMAGE....",
          "content_encoding": "base64",
          "key": "auth_image",
          "description": "Verify that image is equal",          
          "visible": true
        }
      ]
    }

The content_type and the data element with base64-encoded data above can be replaced with a reference to remote data using the content provider instead.

Example: visual data in json code
  "authCommand": {
    "params": {
      ... 
      "description": [
        ... 
        {
          "content_type": "application/hermod+content-id",
          "data": "AUTH:4018e11f-1209-45f5-ade7-e59004e10745",
          "key": "auth_image",
          "description": "Verify that image is equal",
          "visible": true
        }
      ]
    }

It's then up to the content provider to return the correct base64 image data, content_type and content_encoding.

Define authenticate image

An authenticate image can be defined in two ways: by including the actual data or by pointing to a content provider service where the image data is stored. This section describes what to set when using remote data.

ParameterValueDescription
"content_type"

"application/hermod+content-id"

Content type to indicate that the data element has a reference to remote data.

"data"

"<unique identifier>"

Example: 
"AUTH:<uuid>"

Unique identifier for the image data in the content provider, which is defined by contentProviderUrl in the Hermod client. See Add API user and callback URL in Hermod

If you need to set up a content provider, see 4.6 - Requirements on content provider API