Git Product home page Git Product logo

axios-oauth-1.0a's Introduction

axios-oauth-1.0a

Easily add OAuth 1.0a signing to your axios client

Getting Started

  • npm i axios-oauth-1.0a

OAuth Options

algorithm

  • The hashing function to use for the oauth_signature value
  • Available values are: HMAC-SHA1, HMAC-SHA256
  • Default value is HMAC-SHA256

includeBodyHash

  • When true, always try to hash the body and include the hash in the signature
  • When false, never try to calculate oauth_body_hash
  • When 'auto', calculate oauth_body_hash on PUT or POST requests that have a body

key

  • The Consumer Key value

realm

  • An optional value to set the OAuth 1.0 realm

secret

  • The Consumer Secret value

token

  • The Access Token value

tokenSecret

  • An optional value to specify the access token secret

Example

To sign your axios requests using OAuth 1.0a:

import addOAuthInterceptor from 'axios-oauth-1.0a';

// Create a client whose requests will be signed
const client = axios.create();

// Specify the OAuth options
const options = {
    algorithm: 'HMAC-SHA1',
    key: 'xxx',
    secret: 'yyy',
};

// Add interceptor that signs requests
addOAuthInterceptor(client, options);

Documentation

ChangeLog

See github releases

axios-oauth-1.0a's People

Contributors

dobesv avatar renovate[bot] avatar renovate-bot avatar detachhead avatar kfredin-autopay avatar rgigger avatar call203 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.