Authentication API
Secure authentication and access control for mnnn services.
Login
$ curl -X POST https://api.mnnn.com/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "yourpassword"
}'
Response Example
"{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCIOiJKV1QifQ", "userId": "12345", "roles": ["user"] }"
Refresh Token
$ curl -X POST https://api.mnnn.com/v1/auth/refresh \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIOiJKV1QifQ"
Response Example
"{ "token": "eyJhbGciOiJIUzI NIsInR5cCIOiJKV1QifQ" }"
Logout
$ curl -X POST https://api.mnnn.com/v1/auth/logout \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIOiJKV1QifQ"
Response
"{ "success": true }"
User Profile
$ curl -X GET https://api.mnnn.com/v1/auth/profile \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCIOiJKV1QifQ"
Response Example
"{ "userId": "12345", "email": "user@example.com", "roles": ["user"] }"