IBM Bluemix AppID-如何注销/注销? [英] IBM Bluemix AppID - how log off / log out?
问题描述
使用IBM Bluemix App ID时,有人知道如何注销用户吗? GitHub示例应用程序和README上的Node.js服务器SDK包括以下参考:
When using IBM Bluemix App ID, does anyone know how to log out a user? The Node.js server SDK on GitHub sample application and README includes this reference:
const LOGOUT_URL = "/ibm/bluemix/appid/logout";
我尝试了各种排列,但是我无法找出用于注销用户的URL(主机名和扩展名).
I have tried various permutations but I haven't been able to find out what URL to use to log out the user (both hostname and extension).
任何人都可以帮忙吗?
非常感谢.
推荐答案
According to a posting at https://www.ibm.com/developerworks/library/iot-trs-secure-iot-solutions3/index.html , 'There is no explicit "logout" method at time of writing of this article'.
进行一些挖掘后,终止会话将提供注销功能.可以在Node.js中使用以下命令实现:
Having done some digging, killing the session will provide logout functionality. This can be achieved in Node.js with the following:
app.get("/logout", function(req, res){
// Destroy the session
req.session.destroy();
//return the main html file
res.sendfile(__dirname + '/views/index.html');
});
这篇关于IBM Bluemix AppID-如何注销/注销?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!