Authentication Guide
Welcome to the Authentication guide for the Smart Search API. This system is designed to provide secure and flexible access management using a client-user-token structure. Below is an overview of the system's components:
Clients: A client represents an entity (such as a company or application) that interacts with the Smart Search API. Each client receives a unique API key upon creation, which is used to create users associated with that client. Only the Master user can create clients.
Users: A user is an individual account tied to a specific client. Users are created via the
/userendpoint by providing the client's API key in thex-api-keyheader. Each user receives a uniqueidentifierandsecretfor token generation.Tokens: A token is a JWT-based authentication credential used to access protected API endpoints. Users generate tokens using their
identifierandsecret. The system supports backward compatibility - tokens can be created with or without providing a client API key in the header.Token Verification: The system implements a multi-layer verification process that validates JWT signatures, checks expiration, verifies tokens against the database, and ensures tokens haven't been revoked. This provides enhanced security compared to JWT-only validation.
Master User: The Master user has the highest level of access within the system. Only the Master user can create new clients using master credentials (
MASTER_USERNAMEandMASTER_PASSWORD). User creation is delegated to anyone with a valid client API key.
This authentication system ensures secure access control, allowing the Master user to manage client and user creation, while enabling users to authenticate their API requests through tokens.
Last updated
