Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/WyattBrashear/CLIF/llms.txt

Use this file to discover all available pages before exploring further.

CLIF provides three authentication-related endpoints. None of them require prior authentication — they are the entry points for establishing your identity with a CLIF server. After registering and obtaining a user_id, include it along with your pass_hash in every protected request.

POST /register

Create a new user account on the server. The server assigns a unique user_id and sets a default storage allocation based on the server’s CLIF.json configuration.
Send the password as a SHA-256 hex digest. See the API overview for how to compute it.

Request parameters

username
string
required
The display name for the new account. Must be unique on the server.
password
string
required
SHA-256 hex digest of the user’s plaintext password.

Response fields

status
string
required
"success" when the account is created.
message
string
required
"User Created" on success.
user_id
string
required
The server-assigned unique identifier for the new user. Store this — you will need it for all authenticated requests.

Example

curl -X POST http://127.0.0.1:8000/register \
  -H "Content-Type: application/json" \
  -d '{
    "username": "alice",
    "password": "5e884898da28047151d0e56f8dc629277f3c5d53c72a0f4ef4c3b0b8b1c8f6b2"
  }'
Success response
{
  "status": "success",
  "message": "User Created",
  "user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
Save the returned user_id in your client configuration. The server does not expose a way to retrieve it later other than POST /translate_uname.

POST /authenticate

Verify that a user_id and pass_hash pair is valid. Use this to test credentials before making a series of requests, or to confirm a user’s identity in an integration.

Request parameters

user_id
string
required
The user’s unique identifier, returned at registration.
pass_hash
string
required
SHA-256 hex digest of the user’s password.

Response fields

status
string
required
"success" if credentials are valid, "fail" if not.
message
string
required
"Authentication Valid!" on success. "Authentication FailureI!" on failure (note the typo in the server source).

Example

curl -X POST http://127.0.0.1:8000/authenticate \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "YOUR_USER_ID",
    "pass_hash": "YOUR_PASS_HASH"
  }'
{
  "status": "success",
  "message": "Authentication Valid!"
}

POST /translate_uname

Resolve a username string to the corresponding user_id. Use this when you know a user’s display name but need their user_id to make authenticated requests on their behalf, or to look up your own user_id from a known username.
This endpoint does not require authentication. The user_id is returned in the message field of the response.

Request parameters

user_name
string
required
The display name of the user to look up.

Response fields

status
string
required
"success" when the username is found.
message
string
required
The user_id string corresponding to the given username.

Example

curl -X POST http://127.0.0.1:8000/translate_uname \
  -H "Content-Type: application/json" \
  -d '{"user_name": "alice"}'
Success response
{
  "status": "success",
  "message": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Build docs developers (and LLMs) love