oauth2-token

1.0.0 • Public • Published

oauth2-token

Build Coverage Dependencies

Parse OAuth 2.0 tokens.

Install

$ npm install oauth2-token

Usage

var token = oauth2token.parse('{
      "access_token":"mF_9.B5f-4.1JqM",
      "token_type":"Bearer",
      "expires_in":3600,
      "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA"
    }');
// => { type: 'bearer', accessToken: 'mF_9.B5f-4.1JqM', expiresAt: Date(...) }

Tests

$ npm install
$ npm test

Credits

License

The MIT License

Copyright (c) 2013 Jared Hanson <http://jaredhanson.net/>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    12

Package Sidebar

Install

npm i oauth2-token

Weekly Downloads

12

Version

1.0.0

License

none

Last publish

Collaborators

  • jaredhanson