You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@berlingske-media/bm.node-module.user-api-sdk

Package Overview
Dependencies
Maintainers
0
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@berlingske-media/bm.node-module.user-api-sdk

User Service backend sdk

2.1.0
latest
Source
npmnpm
Version published
Weekly downloads
42
50%
Maintainers
0
Weekly downloads
 
Created
Source

Berlingske-Media user api-type instance SDK

This repository contains SDK for user API instances signed with OAuth 2.0 Bearer token.

Usage

Available currently only for backend -> backend communication, usage would be as follows

import { configure, isErrorResponse } from '@berlingske-media/bm.node-module.user-api-sdk';
import { getAccessToken } from '@berlingske-media/bm.node-module.auth_plugin';

const authToken = getAccessToken();

const sdk = configure(
    'https://usa-qa1--usersegment--idm.berlingskemedia-testing.net',
    authToken,
    'source_service_name',
);

const result = await sdk.getBySSOUID('db1d8395d96f473984ea2f7ab947dcf8');

if (isErrorResponse(result)) {
    console.log(result.errorCode);
} else {
    console.log(result.body);
}

FAQs

Package last updated on 27 Nov 2024

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