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

@digitalbazaar/security-context

Package Overview
Dependencies
Maintainers
5
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalbazaar/security-context

Compact isomorphic clone of ccg security-context.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

Linked Data Security Context Repository (@digitalbazaar/security-context)

Build Status NPM Version

Compact isomorphic clone of CCG's security-context.

Table of Contents

Background

This is a copy of the Linked Data Security Vocabulary context, with a refactored export to make it easier to use in the browser and in React Native.

Install

Requires Node.js 12+

To install via NPM:

npm install @digitalbazaar/security-context

Usage

import secCtx from '@digitalbazaar/security-context';
// or
const secCtx = require('@digitalbazaar/security-context');
const {contexts, constants} = secCtx;

secCtx.CONTEXT_URL
// 'https://w3id.org/security/v2'
secCtx.SECURITY_CONTEXT_V1_URL
// 'https://w3id.org/security/v1'
secCtx.SECURITY_CONTEXT_V2_URL
// 'https://w3id.org/security/v2'

// get context data for a specific context
secCtx.contexts.get(secCtx.SECURITY_CONTEXT_V2_URL)
// security/v2 full context object

This package can be used with bundlers, such as webpack, in browser applications.

API

The library exports the following properties:

  • CONTEXT_URL and CONTEXT (it's recommended that context repositories only export one context).
  • constants: A Object that maps constants to well-known context URLs. The main constant CONTEXT_URL may be updated from time to time to the latest context location.
  • contexts: A Map that maps URLs to full context data.

Commercial Support

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

License

  • BSD 3-Clause © Digital Bazaar
  • See the LICENSE file for details.

FAQs

Package last updated on 13 Jun 2023

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