Socket
Socket
Sign inDemoInstall

apigee-auth-jwt

Package Overview
Dependencies
25
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    apigee-auth-jwt

Generate jwt token for your apps of apigee


Version published
Maintainers
1
Created

Readme

Source

Apigee Auth JWT

NPM Version NPM Downloads GitHub issues GitHub forks

Description

The apigee-auth-jwt library provides a simple and efficient way to generate authentication tokens and add authorization headers for requests to Apigee. It also includes a cache system to improve performance by reducing the number of token requests made to the server.

Installation

You can install the library via npm:

npm i apigee-auth-jwt

Usage

Generate token

To generate a token, use the getToken function:

const { getToken }  = require('apigee-auth-jwt');
const token = await getToken('https://myhost.com','client_key','client_secret');

Generate Axios Client with Authorization Header

To generate an Axios client with the authorization header, use the axiosAuth function:

const { axiosAuth }  = require('apigee-auth-jwt');
const axios = await axiosAuth('https://myhost.com','client_key','client_secret');

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

Contributing

Contributions are always welcome! Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvement.

Keywords

FAQs

Last updated on 25 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc