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

@solid/jose

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solid/jose

JSON Object Signing and Encryption

  • 0.1.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-43.55%
Maintainers
4
Weekly downloads
 
Created
Source

JSON Object Signing and Encryption (JOSE)

Planned Features

  • Based on Webcrypto API
  • CryptoKey as expected key argument
  • Isomorphic (Node.js and Browser)
  • JWT Header and Payload Validation with JSON Schema
  • Extensible JWT/JWS/JWE classes

Dependencies

This package is a work in progress, dependent on other ongoing projects. Code contained herein will be completed when the following dependencies are ready to release:

  • anvilresearch/webcrypto

The current contents of the repository should be considered a "sketch".

Scope of implementation

  • JWARFC7518
    • Cryptographic Algorithms for Digital Signatures and MACs
    • Cryptographic Algorithms for Key Management
    • Cryptographic Algorithms for Content Encryption
  • JWKRFC7517
    • JSON Web Key (JWK) Format
    • JWK Set Format
    • JSON Web Key (JWK) Thumbprint (RFC7638)
    • Conversion from JWK to PEM and PEM to JWK
  • JWTRFC7519
  • JWSRFC7515
  • JWERFC7516

Usage in Browser

If you npm install jose as a dependency, the Webpack'd minified bundle will be available in the dist/ directory as jose.min.js.

If you're actively developing/testing this lib, you can npm run dist, and the bundle will be rebuilt.

To use in the browser, simply import the bundle in a <script> tag, and the lib will be loaded into the window.JOSE global variable.

Example test.html file, to illustrate:

<html>
<head>
  <script src="dist/jose.min.js"></script>
  <script>
    // You can now start using the library
    let jwt = new JOSE.JWT({
      header: { alg: 'HS256' },
      payload: { iss: 'https://forge.anvil.io' }
    })
  </script>
</head>
<body>
Sample usage of JOSE lib in a browser.
</body>
</html>

Running tests

Nodejs

$ npm test

Browser (karma)

$ npm run karma

MIT License

Copyright (c) 2016 Anvil Research, Inc.

FAQs

Package last updated on 25 Aug 2018

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