Professional Documents
Culture Documents
QN A
QN A
A. Json Web Token used for encoding and securely transmitting info.This info can be
verified and trusted because it is digitally signed
https://jwt.io/introduction/
Q userid_mapping:
Q Authenticate function:
takes username,password
gets user using user_mapping
if passwords match, returns userNone as default
Q identity function
1.Register at http://127.0.0.1:5000/register
IN: give user details
{
"username":"kitten",
"password":"1234"
}
OUT: user created successfully
3. create an item
at POST http://127.0.0.1:5000/item/glass
IN: {
"price":56
}
OUT:
{
"name": "glass",
"price": 56.0
}
IN:
{
"price":20.8
}
OUT:
Item gets updated/created if doesnt exist
{
"name": "bat",
"price": 20.8
}