Outdated version

You are browsing the docs for Nexus v1.7.x, the latest release is available here

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
sourcecurl "http://localhost:8080/v1/identities"
Response
source{
  "@context": [
    "https://bluebrain.github.io/nexus/contexts/metadata.json",
    "https://bluebrain.github.io/nexus/contexts/identities.json"
  ],
  "identities": [
    {
      "@id": "http://localhost:8080/v1/anonymous",
      "@type": "Anonymous"
    },
    {
      "@id": "localhost:8080/v1/realms/nexusdev/authenticated",
      "@type": "Authenticated",
      "realm": "nexusdev"
    },
    {
      "@id": "localhost:8080/v1/realms/nexusdev/groups/test-group",
      "@type": "Group",
      "group": "test-group",
      "realm": "nexusdev"
    },
    {
      "@id": "localhost:8080/v1/realms/nexusdev/users/test-user",
      "@type": "User",
      "realm": "nexusdev",
      "subject": "test-user"
    }
  ]
}