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

@bigbinary/neeto-api-keys-frontend

v2.2.3

Published

A repo acts as the source of truth for the new nano's structure, configs, data etc.

Downloads

5,396

Readme

neeto-api-keys-nano

The neeto-api-keys-nano facilitates the administration of API keys within neeto applications. The nano exports the @bigbinary/neeto-api-keys-frontend NPM package and neeto-api-keys-engine Rails engine for development.

Contents

  1. Development with Host Application

  2. Instructions for Publishing

Development with Host Application

Engine

The engine is used to manage API keys across neeto products. It also provides concerns to handle common logic related to NeetoApiKeysEngine::ApiKey model.

Installation

  1. Add this line to your application's Gemfile:
    source "NEETO_GEM_SERVER_URL" do
      # ..existing gems
    
      gem 'neeto-api-keys-engine'
    end
  2. And then execute:
    bundle install
  3. Add this line to your application's config/routes.rb file:
    mount NeetoApiKeysEngine::Engine => "/neeto_api_keys_engine"
  4. Run the command to bring in all migrations required from the engine to the host application:
    bundle exec rails neeto_api_keys_engine:install:migrations
  5. Add the migrations to the database:
    bundle exec rails db:migrate

Usage

  1. Add NeetoApiKeysEngine::ApiKeysHandler concern to organization model.

    class Organization < ActiveRecord::Base
      # Include the following concern
      include NeetoApiKeysEngine::ApiKeysHandler

    The NeetoApiKeysEngine::ApiKeysHandler concern is a module that provides functionality related to API keys within the host application. It establishes associations, methods, and logic for working with API keys.

  2. Add the NeetoApiKeysEngine::Authenticatable concern to the controller that requires API key authentication. Utilize the neeto_api_keys_authenticate_using_api_key method within a before_action callback to authenticate the necessary actions.

class Api::V1::PublicApiController < ActionController::Base
  # Include the following concern and callback
  include NeetoApiKeysEngine::Authenticatable

  before_action :neeto_api_keys_authenticate_using_api_key

By default, this method expects the API key in the "X-Api-Key" key in the header. For different keys or implementations, define a token method in the controller that returns the token.

Example:

def token
  request.headers["neeto-Api-Key"]
end

Frontend package

Installation

Install the latest NeetoApiKeysNano package using the below command:

yarn add @bigbinary/neeto-api-keys-frontend

Instructions for development

Check the Frontend package development guide for step-by-step instructions to develop the frontend package.

Components

ApiKeys(source code)

This component is used for managing API keys in a web application. It provides functionality for viewing, creating, updating, and deleting API keys. The component includes a table for displaying API key data, as well as options to add new keys, edit existing ones, and delete keys. It also features a search bar for easily finding specific API keys.

Props
  • noDataProps: Props for handling scenarios when there is no data to display.
  • headerProps: Props for configuring the header section of the component.
  • titleHelpPopoverProps: Props for configuring the help popover in the title section.
Usage
import React from "react";

import { ApiKeys } from "@bigbinary/neeto-api-keys-frontend";

const App = () => <ApiKeys />;

export default App;

Instructions for Publishing

Consult the building and releasing packages guide for details on how to publish.