swagger-magic-auth-interface

0.0.3 • Public • Published

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~authorize

indicates the callback if the user with the given details is authorized for making the current call

Params

  • token String - the authenticated token
  • scopes Array - the scopes of the current request
  • (Function(boolean)) - done - the callback to call when result ready

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

    auth.authorize(token, scopes, done)

auth~authenticate

indicates the callback if the user with the given details is authenticated or not

Params

  • username String - the username to be checked
  • password String - the password to test against
  • (Function(err,user)) - done - the callback to call when result ready

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

    auth.authenticate(username, password, done)

Package Sidebar

Install

npm i swagger-magic-auth-interface

Weekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • borisirota