Page tree

Some use cases of embedding translate5 as a editor only, needs a way to authenticate users by a single click on a link with a unique token.

This feature is similar to Session Authentication but has one important difference:

For session authentication the login and password of the desired user is needed. This is possible for example if the whole user administration is also done in a foreign system.

Single Click Authentication instead works just with a randomly generated token which is needed for authentication then.

Configuration

First of all, this feature must be enabled in the Config. Change therefore the configuration "runtimeOptions.hashAuthentication" to one of the three allowed values:

  • disabled: This is default and disables the usage of single click authentication
  • dynamic: Enables the feature. On each usage of a link the token changes, so that a link is only clickable once.
  • static: The token stays always the same. So everyone with the token/link has access to translate5! Very insecure!

Task - User - Association

To enable a user to open translate5 directly in editing a task, this user must be associated to the task first. This can be done via GUI or API.

On each creation of such an association a token is generated. That means deleting the association and creating it again generates also a new token.

The token can be read via API. Only users with the role "api" are allowed to see the field "staticAuthHash" in the TaskUserAssoc entity.

Further details see in REST-API - TaskUserAssoc.

Usage

With that token an authentication is easy, for example on www.translate5.net just use the following URL to authenticate yourself as a user and open the assigned task:

http://www.translate5.net/editor/session/?authhash=PUT_THE_TOKEN_HERE