Sentinel

Sentinel

Overview

Whats the point of sentinel?

Sentinel provides an API endpoint that multiple apps can implement and then share users between those apps. Created a users on oneclub? That user now works on neuraljam!

Where do I start?

We have swagger docs on how to use the swagger

To begin, you'll typically implement user registration (e.g., using POST /auth/register) and login (e.g., POST /auth/login). Successful login provides a JWT (JSON Web Token) and user information. This JWT is then used to authenticate subsequent requests to Sentinel. For a comprehensive list of endpoints and their specific requirements, please refer to the endpoints documentation.

Authentication

Sentinel's API endpoints utilize different access methods:

  • No Authentication: Certain endpoints, like GET /app/all for retrieving public application information, can be accessed without any authentication.
  • API Key Authentication: Used for initial actions such as registering a new user (e.g., POST /auth/register) or verifying an OTP (e.g., POST /auth/verify-otp).
  • JWT (JSON Web Token) Authentication: After a user logs in, a JWT is issued. This token is then used to authenticate subsequent requests for user-specific data or operator actions.

For detailed information on which endpoints use which authentication method, and specific examples, refer to the endpoints documentation.

Importing Existing Users

If you have an existing user base, Sentinel supports importing users with various common password hash formats. More information can be found in the Importing Users guide.

Registering an app

Registering an app

For your application to utilize Sentinel's user profiles feature (allowing it to store and retrieve app-specific data for users), it must first be registered. This registration process will assign a unique appid (Application ID) to your application.

An operator can register a new application using the following endpoint:

POST /operator/app/register

The request body for this endpoint would typically include details like the application's name, domain, and a description. Upon successful registration, the application will be assigned its appid.

Once your application is registered, you can retrieve a list of all registered applications and their details, including their appid, domain, and description, by using the following endpoint:

GET /app/all

This appid is crucial as it's used in the profile endpoints to associate user profile data with your specific application.