User API

User API provides an interface for user access administration. It is based on Auth0.

Check Token

This API endpoint accepts a “Bearer” ID token of the user. It returns authorized flag and information about the user only if the user is authorized.

Needed Permissions: user.authorize

POST /user/authorize
Response JSON Object:
 
  • token (string) – ID token to validate

Example request:

{
    "token": "JWT-TOKEN"
}
Response JSON Object:
 
  • authorized (bool) – indicates whether requested ID token token is valid.
  • user (object) – information about user authorized with the ID token. This field is not present if the ID token isn’t valid.
  • user.id (str) – unique Auth0 ID of the user.
  • user.email (str) – user’s e-mail.
  • user.name (str) – user’s full name.
  • user.groups (list) – list of groups the user is part of.
  • user.permissions (list) – list of permissions the user is granted. See permission mechanics for more information.

Example response:

{
    "authorized": true,
    "user": {
        "email": "john-smith@example.com",
        "groups": [
            "user"
        ],
        "id": "auth0|mGochhH3Pz5SiCWo8m44",
        "name": "John Smith",
        "permissions": [
            "imagery.availability",
            "imagery.scene-info"
        ]
    }
}

Auth0 Management

This API endpoint returns JWT token which can be used for access to Auth0 Management API. The token is granted the following scopes: read:users, update:users, delete:users, create:users, read:users_app_metadata, update:users_app_metadata, delete:users_app_metadata, create:users_app_metadata.

Needed Permissions: admin.users.manage

POST /user/manage

Example request:

{}
Response JSON Object:
 

Example response:

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL0FVVEgwX0RPTUFJTi8iLCJzdWIiOiJVU0VSX0lEIiwiYXVkIjoiaHR0cHM6Ly9BVVRIMF9ET01BSU4vYXBpL3YyLyIsImlhdCI6MTUzMzk3ODM0MSwiZXhwIjoxNTMzOTgwMTQxLCJhenAiOiJDTElFTlRfSUQiLCJzY29wZSI6InJlYWQ6dXNlcnMgdXBkYXRlOnVzZXJzIGRlbGV0ZTp1c2VycyBjcmVhdGU6dXNlcnMgcmVhZDp1c2Vyc19hcHBfbWV0YWRhdGEgdXBkYXRlOnVzZXJzX2FwcF9tZXRhZGF0YSBkZWxldGU6dXNlcnNfYXBwX21ldGFkYXRhIGNyZWF0ZTp1c2Vyc19hcHBfbWV0YWRhdGEiLCJndHkiOiJjbGllbnQtY3JlZGVudGlhbHMifQ.NnVuJ1IZ5KyWPokQO9p5C5-u5DzV02ry9g8mAaBX9q0"
}