oada-client-secret

    1.0.0 • Public • Published

    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
      }
    });

    Install

    npm i oada-client-secret

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    Apache 2.0

    Last publish

    Collaborators

    • avatar