oauth-dyn-reg

Implementation of draft OAuth 2.0 Dynamic Client Registration Protocol

Usage no npm install needed!

<script type="module">
  import oauthDynReg from 'https://cdn.skypack.dev/oauth-dyn-reg';
</script>

README

Build Status Coverage Status Dependency Status License

oauth-dyn-reg

This is an implementation of the draft OAuth 2.0 Dynamic Client Registration Protocol.

Installation

npm install oauth-dyn-reg

Usage

var register = require('oauth-dyn-reg');

var metadata = { /* See RFC section 2 for what goes here */ };
var registrationEndpoint = /* See RFC section 3 */;

register(metadata, registrationEndpoint, function callback(err, resp) {
    if (!err) {
        // resp contains your client's registered metadata
        // NOTE: resp may differ from metadata, the server MAY change values
    }
});

An OAuth 2.0 token maybe optionally be given after the callback parameter.

References

  1. Draft OAuth 2.0 Dynamic Client Registration Protocol
  2. OAuth 2.0 Authorization Framework