Skip to main content

Authentication API v1.0.0

API for user authentication and JWT token issuance.

Base URLs:

POST /auth/token

Issue JWT Token

Issues a JWT access token for authenticated users.

Parameters

NameInTypeRequiredDescription
bodybodyMailPasswordLoginReqBodytrueLogin payload with email and password

Code samples

curl -X POST https://fridgebridge.simplecharity.com/auth/token \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

Responses

StatusMeaningDescriptionSchema
200OKJWT token issued successfully.ApiResponseWithToken
400Bad RequestInvalid request body or missing parameters.ApiResponse
401UnauthorizedUnauthorized access.ApiResponse
500Internal Server ErrorInternal server error.ApiResponse

Example responses

{
"status": 200,
"data": {
"access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsIm93bmVyX2lkIjoiMTIzNCIsInR5cGUiOiJsZWdhbCIsImV4cCI6MTYzMDYyMzAwMH0.abcdefg12345"
}
}

Schemas

MailPasswordLoginReqBody

{
"mail": "user@example.com",
"password": "securepassword123"
}

Properties

NameTypeRequiredRestrictionsDescription
mailstring(email)truenonenone
passwordstringtruenonenone

ApiResponse

{
"status": 200,
"message": "Success"
}

Properties

NameTypeRequiredRestrictionsDescription
statusintegerfalsenonenone
messagestringfalsenonenone

ApiResponseWithToken

{
"status": 200,
"data": {
"access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtYWlsIjoidXNlckBleGFtcGxlLmNvbSIsIm93bmVyX2lkIjoiMTIzNCIsInR5cGUiOiJsZWdhbCIsImV4cCI6MTYzMDYyMzAwMH0.abcdefg12345"
}
}

Properties

NameTypeRequiredRestrictionsDescription
statusintegerfalsenonenone
dataobjectfalsenonenone
» access-tokenstringfalsenonenone