Skip to content
GBG Documents & Biometrics Documentation

Authentication and languages

The AssureID Connect Web Service uses the HTTP Basic authentication scheme as defined in RFC 2617, HTTP Authentication: Basic and Digest Access Authentication. Basic authentication works as follows:

  • For requests to Web Services that require authentication, the server returns 401 (Unauthorized). The response will include a WWW-Authenticate header, indicating the server supports Basic authentication.
  • The client sends another request, with the client credentials in the Authorization header. The credentials are formatted as the string “name:password” base64-encoded. The credentials are not encrypted.

Because the credentials are sent unencrypted to the server, the resources contained within the AssureID Connect Web Services are only accessible using the HTTPS protocol.

HTTP Basic authentication

Basic authentication is performed within the context of a realm. The server will include “services.assureid.net” as the realm in the WWW-Authenticate header.

The following example demonstrates one approach on how a C# client can easily access a secured AssureID Connect Web Services Basic Authentication resource.

Example

using System;
using System.Net;
using AssureTec.AssureID.Web.SDK;
try
{
//--- Create web service client.
Uri serverAddress = new Uri("https://services.assureid.net");
NetworkCredential credential = new NetworkCredential("user@domain.com", "password");
AssureIDServiceClient client = new AssureIDServiceClient(serverAddress, credential);
//--- Get document from web service.
Guid instanceId = new Guid("0b293196-ee6e-47db-a636-c36e6a76f7fe");
Document document = client.GetDocument(instanceId);
//--- Do additional work.
}
catch (WebException e)
{
Console.WriteLine(e.Message);
}

All API calls now support the Accept-Language header, which lets you display authentication details (responses) in a specified language. AssureID supports the following languages:

Arabic (ar) French (fr) Portuguese (pt)
Czech (cs) German (de) Russian (ru)
Dutch (nl) Greek (el) Spanish (es)
English (en) Italian (it) Turkish (tr)

The following example shows the Accept-Language header for the languages English (en) and German (de).

Example

GET http://connect-service-host/AssureIDService/Document/3701e605-b28f-480b-8354-3f0b308646e1 HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Accept-Language: en
Accept: application/json
Host: connect-service-host
GET http://connect-service-host/AssureIDService/Document/3701e605-b28f-480b-8354-3f0b308646e1 HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Accept-Language: de
Accept: application/json
Host: connect-service-host

AssureID supports optical character recognition (OCR) of the following character sets:

Arabic Japanese
Cyrillic Korean
Chinese Thai
Hebrew Vietnamese
Baltic Turkish