Add jwt token on the validation procedure response
This commit is contained in:
parent
9ca7ba6872
commit
49c5daf228
@ -83,6 +83,7 @@ class validation():
|
||||
response["status" ] = "failed"
|
||||
response["desc" ] = "Your session not found."
|
||||
response["data" ] = {
|
||||
"token" : jwt,
|
||||
"valid" :{
|
||||
"status" : 0,
|
||||
"desc" : "removed"
|
||||
@ -102,6 +103,7 @@ class validation():
|
||||
response["status" ] = "failed"
|
||||
response["desc" ] = "Expired. Your session removed."
|
||||
response["data" ] = {
|
||||
"token" : jwt,
|
||||
"valid" :{
|
||||
"status" : 0,
|
||||
"desc" : "expired"
|
||||
@ -119,6 +121,7 @@ class validation():
|
||||
response["status" ] = "failed"
|
||||
response["desc" ] = "No active account for this"
|
||||
response["data" ] = {
|
||||
"token" : jwt,
|
||||
"message" : "Please contact us if you still had a problem",
|
||||
"valid" :{
|
||||
"status" : 0,
|
||||
@ -134,6 +137,7 @@ class validation():
|
||||
response["status" ] = "success"
|
||||
response["desc" ] = "User roles authorized"
|
||||
response["data" ] = {
|
||||
"token" : str(jwt),
|
||||
"valid" :{
|
||||
"status" : 1,
|
||||
"desc" : "authorized"
|
||||
@ -148,6 +152,7 @@ class validation():
|
||||
response["status" ] = "failed"
|
||||
response["desc" ] = "User roles unauthorized"
|
||||
response["data" ] = {
|
||||
"token" : jwt,
|
||||
"valid" :{
|
||||
"status" : 0,
|
||||
"desc" : "unauthorized"
|
||||
|
Loading…
Reference in New Issue
Block a user