这是API
/注册
用于将新用户注册到系统中
请求:
{
"username" : "your_username",
"password" : "hashed_password", // Hashing happens on client side
"email" : "your_email"
}
响应:
if(successful){
"status" : "Success",
"id" : "identification_number"
}else{
"status" : "Error",
"details" : "reason" // ex: Missing param username
}
/ auth
用于向系统验证用户身份
请求:
{
// Accepted methods: id_only, username_only,email_only
"method" : "authorization_method"
"identity" : "id/username/email" // Based on method attribute
"password" : "hashed_password"
}
响应:
if(successful){
"status" : "Granted"
}else{
"status" : "Error",
"details" : "reason" // ex: Incorrect Details
}