npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

oauth-parameters-registry

v1.1.1

Published

A library for working with the IANA OAuth Parameters Registry

Downloads

17

Readme

README

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, the metadata of the registry, a specific parameter by name, and all parameters in the registry.

All of the underlying JSON that supports this lib is generated over at the iana-registry-data-lib project, which can be found here at iana-registry-data-lib.

Installation

npm install oauth-parameters-registry

API

Available Registries

  • OAuthAccessTokenTypesRegistry
    • A registry of OAuth access token types based on the IANA OAuth Access Token Types Registry.
  • OAuthAuthorizationEndpointResponseTypesRegistry
    • A registry of OAuth authorization endpoint response types based on the IANA OAuth Authorization Endpoint Response Types Registry.
  • OAuthAuthorizationServerMetadataRegistry
    • A registry of OAuth authorization server metadata based on the IANA OAuth Authorization Server Metadata Registry.
  • OAuthDynamicClientRegistrationMetadataRegistry
    • A registry of OAuth dynamic client registration metadata based on the IANA OAuth Dynamic Client Registration Metadata Registry.
  • OAuthExtensionsErrorRegistry
    • A registry of OAuth extensions error codes based on the IANA OAuth Extensions Error Registry.
  • OAuthParametersRegistry
    • A registry of OAuth parameters based on the IANA OAuth Parameters Registry.
  • OAuthTokenEndpointAuthenticationMethodsRegistry
    • A registry of OAuth token endpoint authentication methods based on the IANA OAuth Token Endpoint Authentication Methods Registry.
  • OAuthTokenIntrospectionResponseRegistry
    • A registry of OAuth token introspection responses based on the IANA OAuth Token Introspection Response Registry.
  • OAuthTokenTypeHintsRegistry
    • A registry of OAuth token type hints based on the IANA OAuth Token Type Hints Registry.
  • OAuthUriRegistry
    • A registry of OAuth URIs based on the IANA OAuth URI Registry.
  • PkceCodeChallengeMethodsRegistry
    • A registry of PKCE code challenge methods based on the IANA PKCE Code Challenge Methods Registry.

Available Methods

  • getName(): Returns the name of the registry.
  • getMetadata(): Returns the metadata of the registry including when the data was last processed, and what RFC defined the Registry and a url to the original CSV data at IANA.
  • getParameter(name): Returns a specific parameter by name as an object.
  • getParameters(): Returns all parameters in the registry as an Array.

Usage

// Make an instance
const { OAuthParametersRegistry } = require('oauth-parameters-registry');

const oauthRegistry = new OAuthParametersRegistry();

// Get the name of the registry
const name = oauthRegistry.getName();

// Get the metadata of the registry
const metadata = oauthRegistry.getMetadata();

// Get a specific parameter by name
const parameter = oauthRegistry.getParameter('authorization_details');

// Get all parameters of the registry
const parameters = oauthRegistry.getParameters();

console.log({ name, metadata, parameter, parameters });

would return;

{
  name: 'OAuth Parameters',
          metadata: {
    required_specifications: [ 'RFC6749' ],
            datasource_url: 'https://www.iana.org/assignments/oauth-parameters/parameters.csv',
            last_processed: '2024-10-24T17:49:28.465Z'
  },
  parameter: {
    name: 'authorization_details',
            parameter_usage_location: 'authorization request, token request, token response',
            change_controller: 'IETF',
            reference: 'RFC9396'
  },
  parameters: [
    {
      name: 'client_id',
      parameter_usage_location: 'authorization request, token request',
      change_controller: 'IETF',
      reference: 'RFC6749'
    },
    {
      name: 'client_secret',
      parameter_usage_location: 'token request',
      change_controller: 'IETF',
      reference: 'RFC6749'
    },
    {
      name: 'response_type',
      parameter_usage_location: 'authorization request',
      change_controller: 'IETF',
      reference: 'RFC6749'
    },
    {
      name: 'redirect_uri',
      parameter_usage_location: 'authorization request, token request',
      change_controller: 'IETF',
      reference: 'RFC6749'
    },

    ...
  ]
}