Install
npm install swagger-magic-token-interface --save
swagger-magic-token-interface
token interface for the swagger-magic module
Example
var token = ;
Members
token~generate
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-token-interface
Example
token
token~verify
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-token-interface
Example
token
token~invalidate
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-token-interface
Example
token