Node.js的OAuth扩展 OhAuth
- 授权协议: 未知
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/nickjacob/OhAuth
软件介绍
OhAuth 是基于 Node.js 的扩展,用于简化 OAuth 的开发,实现客户端无重定向的 OAuth 认证支持。
示例代码:
var Express = require('express') , app = Express.createServer(Express.favicon(),Express.static(__dirname)) , OhAuth = require('./ohauth') , strategies = require('./ohauth-strategies'); var cK = 'consumerKey', cS = 'consumerSecret' , ohAuth = new OhAuth(strategies.twitter(cK,cS,'http://127.0.0.1:1337'),app); app.configure(function(){ app.use(app.router); }); app.listen(1337); app.get('/', function (req, res) { res.sendfile(__dirname + '/index.html'); }); // when you're done, you'll get an access key and an access secret printing out here app.get('/oauth/success',function(req,res){ res.send(req.session.credentials); });
游戏人工智能编程案例精粹
巴克兰德 (Mat Buckland) / 罗岱 / 人民邮电出版社 / 2008年06月 / 55.00元
《游戏人工智能编程案例精粹》适合对游戏AI开发感兴趣的爱好者和游戏AI开发人员阅读和参考。一起来看看 《游戏人工智能编程案例精粹》 这本书的介绍吧!
