Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
51
cloud/maplepress-backend/docs/API/get-user-profile.md
Normal file
51
cloud/maplepress-backend/docs/API/get-user-profile.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Get User Profile
|
||||
|
||||
**GET /api/v1/me**
|
||||
|
||||
Get the authenticated user's profile information from the JWT token.
|
||||
|
||||
**Authentication**: Required (JWT token)
|
||||
|
||||
**Headers**:
|
||||
- `Authorization: JWT {access_token}`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```bash
|
||||
curl -X GET http://localhost:8000/api/v1/me \
|
||||
-H "Authorization: JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
||||
```
|
||||
|
||||
**Example Response** (200 OK):
|
||||
|
||||
```json
|
||||
{
|
||||
"user_id": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"email": "john@example.com",
|
||||
"name": "John Doe",
|
||||
"role": "owner",
|
||||
"tenant_id": "650e8400-e29b-41d4-a716-446655440000"
|
||||
}
|
||||
```
|
||||
|
||||
**Error Responses**:
|
||||
|
||||
This endpoint returns errors in **RFC 9457 (Problem Details for HTTP APIs)** format.
|
||||
|
||||
**Content-Type**: `application/problem+json`
|
||||
|
||||
**401 Unauthorized** - Missing or invalid JWT token:
|
||||
```json
|
||||
{
|
||||
"type": "about:blank",
|
||||
"title": "Unauthorized",
|
||||
"status": 401,
|
||||
"detail": "Authentication required"
|
||||
}
|
||||
```
|
||||
|
||||
**Notes**:
|
||||
- Returns user information extracted from the JWT token claims
|
||||
- No database query required - all data comes from the token
|
||||
- Useful for displaying user information in the dashboard
|
||||
- Can be used to verify the current authenticated user's identity
|
||||
Loading…
Add table
Add a link
Reference in a new issue