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

@gitart/test

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gitart/test

RPSEngine client lib

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

rps-engine-client-js

npm version

Regdata RPS Engine Client library (JS)

RPS Engine Client library documentation

The full documentation is available in RPS Community

Installation

Use npm to install the RPS Engine Client library:

npm i rps-engine-client-js

Usage

Simple example

const {
  EngineClient,
  RequestBuilder,
  TokenProvider,
  RPSContext,
  RPSValue,
  RPSEvidence
} = require('rps-engine-client-js/lib')

const IDENTITY_SERVER_HOST_NAME = 'https://identity.rpsprod.ch'
const ENGINE_HOST_NAME = 'https://engine.rpsprod.ch'

const CLIENT_ID = 'c6cbde13-542d-4849-a69e-3962ed09bc10'
const CLIENT_SECRET = '37571534bf6d40878fa77cb7b354b3274e6c047bd6404468b0fa2345cb7ebe61'

const secrets = {
  clientId: CLIENT_ID,
  clientSecret: CLIENT_SECRET
}

const rightsContext = new RPSContext([
  new RPSEvidence({name: 'Role', value: 'Admin'})
])

const processingContext = new RPSContext([
  new RPSEvidence({name: 'Action', value: 'Protect'})
])

const tokenProvider = new TokenProvider({
  identityServerHostName: IDENTITY_SERVER_HOST_NAME,
  ...secrets
})

const engineClient = new EngineClient({
  config: {baseURL: ENGINE_HOST_NAME},
  tokenProvider
})

const instances = [
  new RPSValue({className: 'User', propertyName: 'FirstName', value: 'Jonny'}),
  new RPSValue({className: 'User', propertyName: 'LastName', value: 'Silverhand'}),
  new RPSValue({className: 'User', propertyName: 'BirthDate', value: '16.11.1988'})
]

const requestData = new RequestBuilder()
  .addRequest({instances, rightsContext, processingContext})
  .build()

const response = await engineClient.transform(requestData)
console.log(response)

Keywords

FAQs

Package last updated on 07 Mar 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