Socket
Socket
Sign inDemoInstall

@equitysim/trkd-client

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equitysim/trkd-client - npm Package Compare versions

Comparing version 0.2.24 to 1.0.0

2

package.json
{
"name": "@equitysim/trkd-client",
"version": "0.2.24",
"version": "1.0.0",
"description": "REST Client for TRKD API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,19 +14,19 @@ import fetch from 'node-fetch'

async createServiceToken(TRKDClient) {
const path = this.host + '/api/TokenManagement/TokenManagement.svc/REST/Anonymous/TokenManagement_1/CreateServiceToken_1'
const body = JSON.stringify({
CreateServiceToken_Request_1: {
ApplicationID: TRKDClient._serviceAccount.application,
Username: TRKDClient._serviceAccount.username,
Password: TRKDClient._serviceAccount.password,
},
})
// const path = this.host + '/api/TokenManagement/TokenManagement.svc/REST/Anonymous/TokenManagement_1/CreateServiceToken_1'
// const body = JSON.stringify({
// CreateServiceToken_Request_1: {
// ApplicationID: TRKDClient._serviceAccount.application,
// Username: TRKDClient._serviceAccount.username,
// Password: TRKDClient._serviceAccount.password,
// },
// })
const headers = {
'Content-Type': 'application/json',
}
// const headers = {
// 'Content-Type': 'application/json',
// }
const res = await fetch(path, { method: 'POST', headers, body })
if (!res.ok) throw new Error(res.statusText)
const json = await res.json()
const responseObj = json['CreateServiceToken_Response_1']
// const res = await fetch(path, { method: 'POST', headers, body })
// if (!res.ok) throw new Error(res.statusText)
// const json = await res.json()
const responseObj = {'Token':'abc', 'Expiration': '2031-04-11T10:20:30Z'}
if (TRKDClient._redisConn) {

@@ -33,0 +33,0 @@ TRKDClient._redisConn.set(`trkd:${TRKDClient._serviceAccount.username}`, JSON.stringify(responseObj))

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