Sign In With Credentials - Fluid Topics - 3.6

Use Fluid Topics Web API

Product
Fluid Topics
FT_Version
3.6
Category
Technical Notes
language
English

This public web service allows to sign in to Fluid Topics using login/password credentials.

As a result, the current session is authenticated and all subsequent calls to FT public API take the authenticated user's profile/roles/permissions into account.

This web service works for the following authentication realms:

Method

Endpoint

POST

/api/authentication/login

Return codes

Return Code

Description

200 OK

Credentials are OK.

400 BAD REQUEST

Invalid or missing JSON input.

401 UNAUTHORIZED

Incorrect credentials.

403 FORBIDDEN

Credentials are OK but the user is locked.

The request must set the Content-Type: application/json header.

Input Template

The input JSON expects the following parameters:

Parameter

Cardinality

Type

Description

login

Mandatory

String

Expects the email address used to sign in to the Fluid Topics portal.

password

Mandatory

String

Expects the password corresponding to the given login.

The following lines display an example of JSON input:

{
"login": "jdoe@fluidtopics.com",
"password": "My_Password"
}

Output Example

When credentials are OK, the web service returns enough information to know who is authenticated and in which realm:

{
"sessionId": "0e19bb3a-dcd7-4e81-87e6-7abf5c098bc3",
"profile": {
"userId": "9e193047-860c-418b-8941-bfd59ca5b2a6",
"displayName": "John Arthur Doe",
"emailAddress": "jdoe@fluidtopics.com",
"roles": [
"KHUB_ADMIN",
"PERSONAL_BOOK_USER",
"DEBUG_USER",
"PERSONAL_BOOK_SHARE_USER",
"ADMIN",
"PDF_EXPORT_USER",
"BETA_USER",
"PORTAL_ADMIN",
"SAVED_SEARCH_USER",
"USERS_ADMIN",
"HTML_EXPORT_USER"
]
},
"authenticationIdentifier": {
"identifier": "jdoe@fluidtopics.com",
"realm": "Root User"
}
}

Where:

  • sessionId is the ID of the current authenticated session. It is part of the PLAY_SESSION cookie which is sent back to the caller, and is used to identify the logged-in user in all subsequent web service calls.
  • authenticationIdentifier is the user identifier, and the realm to which this user is authenticated.

If multiple direct login realms are configured (internal, static, root, or LDAP), the login is attempted on all realms one by one, in the order in which they are defined in the conf.json file, and the user is signed in to the first realm that authenticates the user successfully.