oada-client-secret
OADA Client Secret library
Last updated 5 years ago by abalmos .
Apache 2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install oada-client-secret 
SYNC missed versions from official npm registry.

Dependency Status License

oada-client-secret

A node library for creating and verifying client secrets

Examples

var clientSecret = require('oada-client-secret');

var id = getOAuth2SessionClientId();
var accessCode = getOAuth2SessionAccessCode();
var audience = getOAuth2SessionAudience();
var issuer = getOAuth2Issuer();
var key = getSigningKey();

// Generate Client Secret
var cSecret =  clientSecret.generate(key, issuer, audience, accessCode);

// Verify Client Secret

clientSecret.verify(id, cSecret, accessCode, audience, function(err, valid) {
  if(valid) {
    // Approve OAuth 2.0 request
  }
});

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

4 Versions

  • 1.0.0                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |