목록2013/09/01 (1)
좋은 프로그램은 마음의 여유에서 나온다.
node-oauth2-server로 oauth2 구현
설치 npm install node-oauth2-server --save // 모듈 불러오기 var oauthserver = require('node-oauth2-server'); // express 미들웨어로 설정 //bodyParser필수 app.configure(function() { var oauth = oauthserver({ model: require('./oauth/model'), // oauth 2.0의 각종 인증 함수를 구현해 놓은 곳 grants: ['password'] allow: ['/', '/login'], // 인증 없이 접근할 api debug: true }); app.use(express.favicon()); app.use(express.logger('dev')); app.u..
프로그래밍/node.js
2013. 9. 1. 12:52