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

@relaybox/rest

Package Overview
Dependencies
Maintainers
0
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@relaybox/rest - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

8

dist/relaybox.js

@@ -43,5 +43,5 @@ "use strict";

(0, validation_1.validatePermissions)(permissions);
const { keyName, secretKey } = this.apiKeyParts;
const { publicKey, secretKey } = this.apiKeyParts;
const timestamp = new Date().toISOString();
const payload = Object.assign(Object.assign({ keyName,
const payload = Object.assign(Object.assign({ publicKey,
timestamp, tokenType: DEFAULT_TOKEN_TYPE }, (permissions && { permissions })), (clientId && clientId != 'null' && { clientId }));

@@ -96,3 +96,3 @@ const token = (0, signature_1.generateAuthToken)(payload, secretKey, expiresIn);

});
const { keyName: publicKey, secretKey } = this.apiKeyParts;
const { publicKey: publicKey, secretKey } = this.apiKeyParts;
const signature = (0, signature_1.generateHmacSignature)(body, secretKey);

@@ -114,3 +114,3 @@ return [body, signature, publicKey];

return {
keyName: parts[0],
publicKey: parts[0],
secretKey: parts[1]

@@ -117,0 +117,0 @@ };

@@ -5,4 +5,4 @@ export interface RelayBoxOptions {

export interface ApiKeyParts {
keyName: string;
publicKey: string;
secretKey: string;
}
import { JwtPayload } from 'jsonwebtoken';
import { Permissions, Permission } from './permission.types';
export interface ExtendedJwtPayload extends JwtPayload {
keyName: string;
publicKey: string;
clientId?: string | string[];

@@ -6,0 +6,0 @@ timestamp: string;

{
"name": "@relaybox/rest",
"version": "1.3.0",
"version": "1.4.0",
"description": "RelayBox REST Services SDK. Enables seemless integration between server-side applications and RelayBox's authentication and realtime services. It provides robust functionality for generating authentication tokens, publishing events, and interacting efficiently with RelayBox's suite of services.",

@@ -5,0 +5,0 @@ "keywords": [

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