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

@commercelayer/js-auth

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercelayer/js-auth - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

6

lib/cjs/clientCredentials.d.ts

@@ -1,3 +0,3 @@

import { AuthScope, ClientId, ClientSecret, Endpoint } from '#typings';
export declare type Credentials = {
import { AuthScope, ClientId, ClientSecret, Endpoint } from './typings';
export declare type ClientCredentials = {
clientId: ClientId;

@@ -12,3 +12,3 @@ endpoint: Endpoint;

});
export default function ClientCredentials(args: Credentials): Promise<(import("client-oauth2").Token & {
export default function clientCredentials(args: ClientCredentials): Promise<(import("client-oauth2").Token & {
data: import("client-oauth2").Data & {

@@ -15,0 +15,0 @@ owner_id?: string | undefined;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:true});const tslib_1=require("tslib");const authenticate_1=(0,tslib_1.__importDefault)(require("./authenticate"));async function ClientCredentials(e){const{scope:t,endpoint:i,clientSecret:n=""}=e,s=(0,tslib_1.__rest)(e,["scope","endpoint","clientSecret"]);const c=Object.assign(Object.assign({},s),{clientSecret:n,accessTokenUri:`${i}/oauth/token`,redirectUri:""});return(0,authenticate_1.default)("clientCredentials",c,t)}exports.default=ClientCredentials;
"use strict";Object.defineProperty(exports,"__esModule",{value:true});const tslib_1=require("tslib");const authenticate_1=(0,tslib_1.__importDefault)(require("./authenticate"));async function clientCredentials(e){const{scope:t,endpoint:i,clientSecret:n=""}=e,c=(0,tslib_1.__rest)(e,["scope","endpoint","clientSecret"]);const s=Object.assign(Object.assign({},c),{clientSecret:n,accessTokenUri:`${i}/oauth/token`,redirectUri:""});return(0,authenticate_1.default)("clientCredentials",s,t)}exports.default=clientCredentials;
import { GetCustomerToken, User } from './salesChannel';
import { GetWebappToken } from './webapp';
import clientCredentials, { Credentials } from './clientCredentials';
import clientCredentials, { ClientCredentials } from './clientCredentials';
import { AuthReturnType, AuthScope } from './typings';

@@ -10,3 +10,3 @@ declare const getSalesChannelToken: import("./salesChannel").SalesChannel;

declare const getWebappToken: GetWebappToken;
export { authorizeWebapp, clientCredentials, getCustomerToken, getIntegrationToken, getSalesChannelToken, getWebappToken, Credentials, User, AuthReturnType, AuthScope, };
export { authorizeWebapp, clientCredentials, getCustomerToken, getIntegrationToken, getSalesChannelToken, getWebappToken, ClientCredentials, User, AuthReturnType, AuthScope, };
declare const CLayerAuth: {

@@ -13,0 +13,0 @@ authorizeWebapp: import("./webapp").Webapp;

@@ -1,2 +0,3 @@

import { ClientId, Endpoint, AuthReturnType, AuthScope } from './typings';
import { ClientCredentials } from './clientCredentials';
import { AuthReturnType } from './typings';
export interface User {

@@ -6,7 +7,2 @@ username: string;

}
export interface ClientCredentials {
clientId: ClientId;
endpoint: Endpoint;
scope: AuthScope;
}
export declare type GetCustomerToken = (clientCredential: ClientCredentials, user: User) => AuthReturnType;

@@ -13,0 +9,0 @@ export interface SalesChannel {

@@ -1,3 +0,3 @@

import { AuthScope, ClientId, ClientSecret, Endpoint } from '#typings';
export declare type Credentials = {
import { AuthScope, ClientId, ClientSecret, Endpoint } from './typings';
export declare type ClientCredentials = {
clientId: ClientId;

@@ -12,3 +12,3 @@ endpoint: Endpoint;

});
export default function ClientCredentials(args: Credentials): Promise<(import("client-oauth2").Token & {
export default function clientCredentials(args: ClientCredentials): Promise<(import("client-oauth2").Token & {
data: import("client-oauth2").Data & {

@@ -15,0 +15,0 @@ owner_id?: string | undefined;

@@ -1,1 +0,1 @@

import{__rest}from"tslib";import authenticate from"./authenticate";export default async function ClientCredentials(e){const{scope:t,endpoint:n,clientSecret:c=""}=e,i=__rest(e,["scope","endpoint","clientSecret"]);const r=Object.assign(Object.assign({},i),{clientSecret:c,accessTokenUri:`${n}/oauth/token`,redirectUri:""});return authenticate("clientCredentials",r,t)}
import{__rest}from"tslib";import authenticate from"./authenticate";export default async function clientCredentials(e){const{scope:t,endpoint:n,clientSecret:c=""}=e,i=__rest(e,["scope","endpoint","clientSecret"]);const r=Object.assign(Object.assign({},i),{clientSecret:c,accessTokenUri:`${n}/oauth/token`,redirectUri:""});return authenticate("clientCredentials",r,t)}
import { GetCustomerToken, User } from './salesChannel';
import { GetWebappToken } from './webapp';
import clientCredentials, { Credentials } from './clientCredentials';
import clientCredentials, { ClientCredentials } from './clientCredentials';
import { AuthReturnType, AuthScope } from './typings';

@@ -10,3 +10,3 @@ declare const getSalesChannelToken: import("./salesChannel").SalesChannel;

declare const getWebappToken: GetWebappToken;
export { authorizeWebapp, clientCredentials, getCustomerToken, getIntegrationToken, getSalesChannelToken, getWebappToken, Credentials, User, AuthReturnType, AuthScope, };
export { authorizeWebapp, clientCredentials, getCustomerToken, getIntegrationToken, getSalesChannelToken, getWebappToken, ClientCredentials, User, AuthReturnType, AuthScope, };
declare const CLayerAuth: {

@@ -13,0 +13,0 @@ authorizeWebapp: import("./webapp").Webapp;

@@ -1,2 +0,3 @@

import { ClientId, Endpoint, AuthReturnType, AuthScope } from './typings';
import { ClientCredentials } from './clientCredentials';
import { AuthReturnType } from './typings';
export interface User {

@@ -6,7 +7,2 @@ username: string;

}
export interface ClientCredentials {
clientId: ClientId;
endpoint: Endpoint;
scope: AuthScope;
}
export declare type GetCustomerToken = (clientCredential: ClientCredentials, user: User) => AuthReturnType;

@@ -13,0 +9,0 @@ export interface SalesChannel {

{
"name": "@commercelayer/js-auth",
"version": "2.2.1",
"version": "2.2.2",
"description": "Commerce Layer Javascript Auth",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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