Skip to content

Repository files navigation

README

oauth-parameters-registry is a Node.js module that provides typed access to the IANA OAuth Parameters registries.

The underlying registry snapshots are generated by iana-registry-data-lib.

Installation

npm install oauth-parameters-registry

Version 2

Version 2 is a breaking change. It uses the dataset-backed API from iana-registry-data-lib@3 and exposes registry entries rather than v1 parameters.

  • getParameter(name) has been replaced by getEntry(value).
  • getParameters() has been replaced by getEntries().
  • metadata.last_processed has been replaced by metadata.last_updated_iso.

API

Available Registries

  • OAuthAccessTokenTypesRegistry
  • OAuthAuthorizationEndpointResponseTypesRegistry
  • OAuthAuthorizationServerMetadataRegistry
  • OAuthDynamicClientRegistrationMetadataRegistry
  • OAuthExtensionsErrorRegistry
  • OAuthParametersRegistry
  • OAuthTokenEndpointAuthenticationMethodsRegistry
  • OAuthTokenIntrospectionResponseRegistry
  • OAuthTokenTypeHintsRegistry
  • OAuthUriRegistry
  • OAuthPkceCodeChallengeMethodsRegistry

Available Methods

  • getName(): Returns the registry name.
  • getMetadata(): Returns registry metadata, including required_specifications, datasource_url, and last_updated_iso.
  • getEntry(value): Returns a specific registry entry by the registry-specific lookup value.
  • getEntries(): Returns all entries in the registry.

The package also exports createRegistry(id) for creating registries by ID.

Usage

const { OAuthParametersRegistry, createRegistry } = require('oauth-parameters-registry');

const oauthRegistry = new OAuthParametersRegistry();

const name = oauthRegistry.getName();
const metadata = oauthRegistry.getMetadata();
const entry = oauthRegistry.getEntry('authorization_details');
const entries = oauthRegistry.getEntries();

const tokenTypes = createRegistry('oauth.access_token_types');
const bearer = tokenTypes.getEntry('Bearer');

console.log({ name, metadata, entry, entries, bearer });

Example shape:

{
  name: 'OAuth Parameters',
  metadata: {
    required_specifications: ['RFC6749'],
    datasource_url: 'https://www.iana.org/assignments/oauth-parameters/parameters.csv',
    last_updated_iso: '2026-03-29T00:03:13.830Z'
  },
  entry: {
    entry_id: 'authorization_details',
    name: 'authorization_details',
    parameter_usage_location: 'authorization request, token request, token response',
    change_controller: 'IETF',
    reference: 'RFC9396'
  },
  entries: [
    {
      entry_id: 'access_token',
      name: 'access_token',
      parameter_usage_location: 'authorization response, token response',
      change_controller: 'IETF',
      reference: 'RFC6749'
    }
  ],
  bearer: {
    entry_id: 'Bearer',
    name: 'Bearer',
    additional_token_endpoint_response_parameters: '',
    http_authentication_scheme: 'Bearer',
    change_controller: 'IETF',
    reference: 'RFC6750'
  }
}

About

oauth-parameters-registry is a Node.js module that provides a registry of OAuth parameters. The registry is based on the IANA OAuth Parameters Registry, which is a registry of parameters registered in the OAuth protocol with IANA. The module provides a simple API for accessing the registry, including methods for getting the name of the registry.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages