Get session information - Fluid Topics - Latest

Fluid Topics API Reference Guide

Category
Reference Guides
Audience
public
Version
Latest

This public web service allows to get information about the current session.

Method Endpoint
GET /api/authentication/current-session

Response body

  • When the session is not authenticated, the web service returns the following JSON response body:
{
    "sessionAuthenticated": false
}

The user is not logged in and remains anonymous to Fluid Topics but a session is still created for these users to keep track of them.

  • When the session is authenticated, the web service returns the following JSON response body:
{
    "sessionAuthenticated": true,
    "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 the "profile" and "authenticationIdentifier" nodes are optional. They are only present when the session is authenticated (sessionAuthenticated == true).

In this case, the web service returns a basic user profile.