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["status" ] = "failed"
|
||||||
response["desc" ] = "Your session not found."
|
response["desc" ] = "Your session not found."
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
|
"token" : jwt,
|
||||||
"valid" :{
|
"valid" :{
|
||||||
"status" : 0,
|
"status" : 0,
|
||||||
"desc" : "removed"
|
"desc" : "removed"
|
||||||
@ -102,6 +103,7 @@ class validation():
|
|||||||
response["status" ] = "failed"
|
response["status" ] = "failed"
|
||||||
response["desc" ] = "Expired. Your session removed."
|
response["desc" ] = "Expired. Your session removed."
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
|
"token" : jwt,
|
||||||
"valid" :{
|
"valid" :{
|
||||||
"status" : 0,
|
"status" : 0,
|
||||||
"desc" : "expired"
|
"desc" : "expired"
|
||||||
@ -119,6 +121,7 @@ class validation():
|
|||||||
response["status" ] = "failed"
|
response["status" ] = "failed"
|
||||||
response["desc" ] = "No active account for this"
|
response["desc" ] = "No active account for this"
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
|
"token" : jwt,
|
||||||
"message" : "Please contact us if you still had a problem",
|
"message" : "Please contact us if you still had a problem",
|
||||||
"valid" :{
|
"valid" :{
|
||||||
"status" : 0,
|
"status" : 0,
|
||||||
@ -134,6 +137,7 @@ class validation():
|
|||||||
response["status" ] = "success"
|
response["status" ] = "success"
|
||||||
response["desc" ] = "User roles authorized"
|
response["desc" ] = "User roles authorized"
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
|
"token" : str(jwt),
|
||||||
"valid" :{
|
"valid" :{
|
||||||
"status" : 1,
|
"status" : 1,
|
||||||
"desc" : "authorized"
|
"desc" : "authorized"
|
||||||
@ -148,6 +152,7 @@ class validation():
|
|||||||
response["status" ] = "failed"
|
response["status" ] = "failed"
|
||||||
response["desc" ] = "User roles unauthorized"
|
response["desc" ] = "User roles unauthorized"
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
|
"token" : jwt,
|
||||||
"valid" :{
|
"valid" :{
|
||||||
"status" : 0,
|
"status" : 0,
|
||||||
"desc" : "unauthorized"
|
"desc" : "unauthorized"
|
||||||
|
Loading…
Reference in New Issue
Block a user