OpenFolia

Who is calling

GET
/me

The actor this request acts as: the user (signed in, #37; in demo mode, the one X-Ccms-User names) or the read-only service of the shared token, with its roles and effective permissions. meta.session when it acts through a signed-in session.

Authorization

bearer
headerAuthorizationBearer <JWT>

A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.

Header Parameters

X-Ccms-User?string

Demo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).

Response Body

application/vnd.api+json
  1. response
data*

id is the user ID, the service account ID (kind service), or service:api-token for the shared token acting as a read-only service.

Example Request
curl -X GET 'http://localhost:3000/me'
Example Response
{  "data": {    "type": "Actor",    "id": "string",    "attributes": {      "kind": "user",      "name": "string",      "roles": [        {          "id": "string",          "name": "string",          "permissions": [            "content.read"          ],          "scope": {            "languages": [              "string"            ],            "moduleTypes": [              "string"            ],            "maxAudience": "string",            "facets": {              "property1": [                "string"              ],              "property2": [                "string"              ]            }          }        }      ]    },    "meta": {      "permissions": [        {          "permission": "content.read",          "scopes": [            {              "languages": [                "string"              ],              "moduleTypes": [                "string"              ],              "maxAudience": "string",              "facets": {                "property1": [                  "string"                ],                "property2": [                  "string"                ]              }            }          ]        }      ],      "session": {        "provider": "string",        "expiresAt": "2019-08-24T14:15:22Z"      }    }  }}