Config 2.2: JSON Types

To return JSON types, you need to define few extra fields:

    "Content_type":"application/json; charset=UTF-8",

where Challenge, Logged, Logout and Failed are mandatory. Their meaning are:

  • Challenge: if visitor has no valid login ticket, instead of redirecting to a login screen, Genelet returns you {“data”:”challenge”}
  • Logged: after a successful login, Genelet returns you {“data”:”logged”}
  • Logout: after a successful logout, Genelet returns you {“data”:”logout”}
  • Failed: if an error is found, Genelet returns you {“data”:”failed”}

Finally, Case=1 is for JSON only.