UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

34 lines (33 loc) 752 B
import { AuthenticationApi as s } from "@sage-bionetworks/aridhia-client/generated/apis"; import { Configuration as i } from "@sage-bionetworks/aridhia-client/generated/runtime"; async function c(n, t, e) { const a = await new s( new i({ basePath: t }) ).authenticatePost({ authenticationRequest: { ...e, subject_token: n } }); if (!a.access_token) throw new Error("Failed to obtain Aridhia access token"); return a; } async function h(n, t, e) { const o = await c( n, t, e ); return new i({ basePath: t, accessToken: o.access_token }); } export { h as createAridhiaApiConfiguration, c as exchangeSynapseTokenForAridhia }; //# sourceMappingURL=aridhiaTokenExchange.js.map