Feature Introduction#
The authentication function is mainly used to ensure the security of the API and to implement access control for FlightHub 2.Authentication is the process of verifying a user's identity. OpenAPI authenticates by passing the X-User-Token in the Header parameter of an HTTPS request.Authorization refers to the process of determining whether a user has permission to access specific resources after authentication is successful. FlightHub 2 will authorize based on the provided X-User-Token and X-Project-Uuid. Please ensure that the user corresponding to the X-User-Token has the project permissions to access the project normally.Note: X-User-Token is a JWT token. You can use a JWT Decoder to parse the user infomation corresponding to the token. If authorization fails, please check on lightHub 2 whether the user has the permissions for the project being accessed. Interface Usage Process#
Please refer to the following sequence diagram to obtain the user token and project UUID offline. Pass the X-User-Token and X-Project-Uuid into the Header parameter of the OpenAPI interface to communicate with FlightHub 2.The current X-User-Token for FlightHub 2 is the organization key for FlightHub Sync. The path to obtain the organization key is as follows: FlightHub 2 -> My Organization -> Organization Settings -> FlightHub Sync -> Organization Key.
The X-Project-Uuid can be obtained from the data.list.uuid in the project list interface under the organization.
Taking adding personnel to a project as an example:Modified at 2025-02-24 12:42:59