Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@curity/identityserver-haapi-web-driver

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@curity/identityserver-haapi-web-driver

Curity Web CAT driver

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-21.22%
Maintainers
2
Weekly downloads
 
Created
Source

HAAPI Web SDK

Typescript/Javascript library with classes and functions to access Curity Identity Server Hypermedia Authentication API (HAAPI) from browser-based applications. The library is available on the npm public registry and can be installed using:

npm install @curity/identityserver-haapi-web-driver

Usage example

The package defines the createHaapiFetch function, which creates fetch-like functions that can be used to perform HAAPI requests. The returned functions automatically manage attestation, access tokens, DPoP tokens, and Session-Id under the covers.

// 0 - Import the createHaapiFetch function
import { createHaapiFetch } from '@curity/identityserver-haapi-web-driver';

// 1 - Create a fetch-like function to perform HAAPI requests
const haapiFetch = createHaapiFetch({
    clientId: 'test-client-id',
    tokenEndpoint: 'https://localhost:8443/dev/oauth/token',
});

// 2 - Use haapiFetch to access HAAPI resources
const authorizeRequest = '/dev/oauth/authorize?client_id=test-client-id&response_type=code&scope=read&state=foobar&redirect_uri=https://localhost:7777/client-callback';
haapiFetch(authorizeRequest)
    .then(res => {
        // ...
    });

Keywords

FAQs

Package last updated on 03 Mar 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc