Notification process can not be continued with JSON response
Summary
If a notification is pending, JSON response returned by the Portal is:
{
"error" : "36",
"result" : 0
}
A use case is Slave authentication.
Design proposition
To be able to forward and continue notification process, the ciphered id should be returned in JSON response. With this Id, a cookie can be built and sent to /notifback route.
{
"ciphered_id" : "Tp2Y2+3pnOjx+LFhs59JLDpo3KMj+IeHD1YYbQL4VkOfrM57BgDxEujG//PSwoCbzq95Md5CupQxFiUsNHPAA7/METsyJAQ76NOMW/rn3sfKZT5yw0aupStFQDY/B/Tdd1YyrBQqdqt9Lt83eFwMsw==",
"error" : "36",
"result" : 0
}
curl -H "Cookie: lemonldap='Tp2Y2+3pnOjx+LFhs59JLDpo3KMj+IeHD1YYbQL4VkOfrM57BgDxEujG//PSwoCbzq95Md5CupQxFiUsNHPAA7/METsyJAQ76NOMW/rn3sfKZT5yw0aupStFQDY/B/Tdd1YyrBQqdqt9Lt83eFwMsw=='" http://auth.example.com:19876/notifback
<body>
<div id="wrap">
<div id="header"> <!-- Custom HTML header -->
<img src="/static/common/logos/logo_llng_400px.png" class="img-fluid rounded mx-auto d-block" />
</div>
<div id="notifcontent" class="container">
<form action="/notifback" method="post" class="notif" role="form">
<input type="hidden" name="url" value="aHR0cDovL2F1dGguZXhhbXBsZS5jb206MTk4NzYvL25vdGlmYmFjaw==" />
<div class="card border-info">
<div class="card-header text-white bg-info">
<h3 class="card-title" trspan="gotNewMessages">You have some new messages</h3>
</div>
<div class="card-body">
<div class="form">
<input type="hidden" name="reference1x1" value="aaaaq"/>
<h2 class="notifText">...</h2>
<h3 class="notifText">...</h3>
<p class="notifText">...</p>
An option could be appended in Manager to disable this feature if required...