Socket
Book a DemoInstallSign in
Socket

swagger-magic-auth-interface

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-magic-auth-interface

auth interface for the swagger-magic module

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
2
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Install

npm install swagger-magic-auth-interface --save

#swagger-magic-auth-interface auth interface for the swagger-magic module

Example

    var auth = require("swagger-magic-auth-interface");

Members

##auth~generateToken generates the token

Params

  • user Object - the user that his fields can be added as attributes to the token
  • (Function(err,token)) - done - the callback to call when result ready

Scope: inner member of swagger-magic-auth-interface
Example

    auth.generateToken(user, done)

##auth~verifyToken verifies the validity of the token

Params

  • token String - the token to be verified
  • (Function(err,token)) - done - the callback to call when result ready

Scope: inner member of swagger-magic-auth-interface
Example

    auth.verifyToken(token, done)

##auth~invalidateToken invalidates the token

Params

  • token String - the token to invalidate
  • (Function(err,boolean)) - done - the callback to call when result ready

Scope: inner member of swagger-magic-auth-interface
Example

    auth.invalidateToken(token, done)

Keywords

swagger

FAQs

Package last updated on 04 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts