Skip to main content
Skip table of contents

Use authentication images from a content provider service

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

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

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 Requirements on content provider API



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.