Identities

The /v1/identities endpoint allows user to retrieve the identities that the user has in the platform. Calling the endpoint without a token will result in only one identity returned: Anonymous. Calling it with token should return multiple identities. There are four different types of identities:

  • Anonymous - represents anonymous user
  • Authenticated - represents a realm via which the user is authenticated
  • Group - represents a group to which a user belongs in a realm
  • User - represents the user.

The following HTTP call can used to retrieve the identities:

GET /v1/identities

Example

Request
curl "https://nexus.example.com/v1/identities"
Full source at GitHub
Response
{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/iam.json",
    "https://bluebrain.github.io/nexus/contexts/resource.json"
  ],
  "identities": [
    {
      "@id": "https://nexus.example.com/v1/anonymous",
      "@type": "Anonymous"
    },
    {
      "@id": "https://nexus.example.com/v1/realms/nexusdev/authenticated",
      "@type": "Authenticated",
      "realm": "nexusdev"
    },
    {
      "@id": "https://nexus.example.com/v1/realms/nexusdev/groups/test-group",
      "@type": "Group",
      "group": "test-group",
      "realm": "nexusdev"
    },
    {
      "@id": "https://nexus.example.com/v1/realms/nexusdev/users/test-user",
      "@type": "User",
      "realm": "nexusdev",
      "subject": "test-user"
    }
  ]
}
Full source at GitHub