header, body 모두 필요
Headers
{
Authorization: "Token [Token key value]"
}
Body
{
"new_password1": "",
"new_password2": ""
}
Example
{
"new_password1": "ssafy321",
"new_password2": "ssafy321"
}
[Success]
200: “OK”
{
"detail": "New password has been saved."
}
{
"detail": "새로운 패스워드가 저장되었습니다."
}
[Fail]
400: “Bad Request”
// 비밀번호와 email이 유사함
{
"new_password2": [
"비밀번호가 email와 너무 유사합니다."
]
}
400: “Bad Request”
// 일반적인 비밀번호
{
"new_password2": [
"비밀번호가 너무 일상적인 단어입니다."
]
}
400: “Bad Request”
// 빈칸을 보낼 때
{
"new_password1": [
"이 필드는 blank일 수 없습니다."
],
"new_password2": [
"이 필드는 blank일 수 없습니다."
]
}
400: “Bad Request”
// 일치하지 않을 때
{
"new_password2": [
"비밀번호가 일치하지 않습니다."
]
}
403: “Forbidden”
{
"detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}