twitter-oauth-echo

    1.0.1 • Public • Published

    Installation

      npm install twitter-oauth-echo --save 

    Basic Usage

    Request must contain x-auth-service-provider and x-verify-credentials-authorization headers.View resources for more info.

    var express = require('express');
    var app = express();
    var twitterEcho = require('twitter-oauth-echo');
     
    app.use(twitterEcho({ errorMessage : 'You are not authorized' })); 
    //errorMessage defaults to UnAuthorized 
     

    Sample usage with express.Router object.

    var express = require('express');
    var twitterEcho = require('twitter-oauth-echo');
    var router = express.Router();
     
    //check for all routes and methods of router 
    router.all('*' , twitterEcho());
     
    router.get('/hello' , function(req , res ){
        res.send('hello will be sent if req is authorized.');
    });
     
    module.exports = router ;

    Resources

    License

    This repository is licensed under the MIT License

    Install

    npm i twitter-oauth-echo

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • scriptnull