New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@egendata/react-native-jose

Package Overview
Dependencies
Maintainers
4
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@egendata/react-native-jose

TODO

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

react-native-jose

Getting started

$ npm install react-native-jose --save

Manual installation

iOS
  1. Add this to your Podfile inside your target
pod 'react-native-jose', :path => '../node_modules/@egendata/react-native-jose'
  1. Add (if you haven't already or just edit existing post_install settings) in the Podfile
post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-jose'
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
      end
    end
  end
end
  1. Run your project (Cmd+R)<
Android
  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.JosePackage to the imports at the top of the file
  • Add new JosePackage() to the list returned by the getPackages() method

Usage

import * as Jose from '@egendata/react-native-jose'

// TODO: What to do with the module?
console.log(Jose)

sign

import {sign} from '@egendata/react-native-jose'

const payload = {}
const privateKeys = {
	jwk: {},
	pem: '...'
} // private key containing "jwk" and "der" representations
const header = {}
const token = await sign(payload, privateKeys, header)

verify

import {verify} from '@egendata/react-native-jose'

const token = '...'
const jwk = {} // public key
const payload = await verify(token, jwk)

decode

import {decode} from '@egendata/react-native-jose'

const token = '...'
const options = {} // not used currently
const {claimsSet, header, signature} = await decode(token, options)

addRecipient

import {addRecipient} from '@egendata/react-native-jose'

const jwe = {}
const ownerKeys = {
	jwk: {},
	pem: ''
} // private key containing "jwk" and "pem" representations
const recipientKeys = {
	jwk: {},
	pem: ''
} // public key containing "jwk" and "pem" representations
const alg // currently only supports "RSA-OAEP"

const newJwe = await addRecipient(payload, ownerKeys, recipientKeys, alg)

Keywords

FAQs

Package last updated on 15 Jan 2020

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