-
Add
secure-storage.localhost
to your/etc/hosts
:127.0.0.1 secure-storage.localhost
-
Run
make init
to initialize project -
Open in browser: http://secure-storage.localhost:8000/item Should get
Full authentication is required to access this resource.
error, because first you need to makelogin
call (seepostman_collection.json
orSecurityController
for more info).
make tests
- User: john
- Password: maxsecure
You can import all available API calls to Postman using postman_collection.json
file
- All responses are based on JSON
- Unauthenticated request will be responded with 401 (UNAUTHORIZED)
ENDPOINT | TYPE | PARAMETERS | MUST BE AUTHENTICATED |
---|---|---|---|
login |
POST |
username * password * |
No |
logout |
POST |
- | No |
item |
GET |
- | Yes |
item |
POST |
data * |
Yes |
item |
PUT |
id * data * |
Yes |
item/{id} |
PUT |
id * |
Yes |
* Parameter is mandatory