Skip to main content

Overview of the authentication process

JSON Web Token (JWT) is a format for transferring data securely between the ABBYY FlexiCapture 12 Application Server and third-party services. When authenticating through JWT, no identification data is sent to the Application Server. Authentication is carried out on a third-party service, following which the Application Server is informed that the user has been authenticated by a trusted service.

Implementation

Get JSON data

The JSON data looks like this.
JSON data containing user certificates is encoded in Base64 to create a JSON web token (JWT). The following sample creates a JWT token:

Send a JWT to the Application Server

Send the JWT to the Application Server in a POST request to https://<ApplicationServer>/Flexicapture12/Server/jwt. For a tenant, add the tenant identifier to the URL, for example https://<ApplicationServer>/Flexicapture12/Server/jwt?Tenant=MyTenantName.
Authentication needs a matching user registered on the Application Server. Its login must match the identifier in the JWT, held in the nameid node value. The Application Server returns a response like this:
The value in the ticket field is the authenticated ABBYY FlexiCapture 12 ticket. You can use this ticket to make calls to all Application Server interfaces that require authentication. Services should be accessed using ABBYY FlexiCapture authentication, that is, addresses starting with https://<ApplicationServer>/flexicapture12/Server/FCAuth/ or https://<ApplicationServer>/flexicapture12/Server/MobileApp/.

Use an authenticated ABBYY FlexiCapture 12 ticket

Pass an authenticated ABBYY FlexiCapture 12 ticket to the server with an Authorization: Bearer header. A cookie file named FlexiCaptureTmpPrn also works, but is supported only for downward compatibility. For example:

Set up a trusted certificate on the Application Server

The Application Server will check the data received from the identity provider. For the Application Server to trust this data, sign it with a custom certificate. The issuing authority must appear in the Application Server database of trusted authorities. Import the certificate to the ABBYY FlexiCapture database. The Application Server then checks data against that certificate. For more information, see Set up Single Sign-On. If the check fails, the Application Server refers to the AllowMixedModeCertificateValidation parameter under <appSettings> in the Web.config file. When that parameter is true, the check uses the certificate in the Trusted Root Certification Authorities folder. That folder sits in the Local Computer certificate store on the computer running the Application Server. If the database holds no certificates, the check falls back to the certificate in the Trusted Root Certification Authorities folder. The AllowMixedModeCertificateValidation parameter is then ignored. A sample project and its accompanying materials are available as JWT_Example.zip.