swagger-magic-social-auth-handler

0.0.3 • Public • Published

Install

npm install swagger-magic-social-auth-handler --save

swagger-magic-social-auth-handler

This module adds all the missing parts to the auth aspect. It adds the relevant paths and definitons into the swagger spec and configure controller.

Params

  • swaggerObject Object - swagger spec representing the api
  • token Object - implementation of the swagger-magic-token-interface. required if securityDefinitions defined in the swagger spec
  • auth Object - implementation of the swagger-magic-social-auth-interface. required if x-swagger-magic-social defined in the swagger spec

Returns: Object - contains a mapping between path and a handler. {path1: function (req, res, next), path2: {req, res, next}}
Example

    var socialAuthHandler = require("swagger-magic-social-auth-handler");
 
    var socialAuthController = socialAuthHandler(swaggerObject, token, auth);
 
    if (socialAuthController) {
       _.each(socialAuthController, function (value, key) {
            app.get(key, value);
        });
    }
 

/swagger-magic-social-auth-handler/

    Package Sidebar

    Install

    npm i swagger-magic-social-auth-handler

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • borisirota