adobe / aemcs-api-client-lib Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
This AEMCS-API-Client-Lib uses JWT authentication, which is deprecated, and will no longer work from 27-JAN-25.
From JUN-24, no new Adobe Developer Console integrations with JWT authentication can be created any longer.
Will this library be updated for use of Oauth?
An additional question would be, if this library will be maintained in the future, and if it could be used in production environments as dependency?
Being able to use the library in TypeScript without having to do anything.
Issue about .d.ts missing
Import the library in TypeScript
Install the library into a TypeScript project
All
'use strict';
import exchange from '@adobe/aemcs-api-client-lib';
import fs from 'fs';
const JSON_FILE = 'aemcs-service-credentials.json';
export async function getToken(): Promise<string> {
const config = JSON.parse(fs.readFileSync(JSON_FILE, 'utf8'));
const accessToken = await exchange(config);
return accessToken;
}
No log
At a minimum:
declare module '@adobe/aemcs-api-client-lib' {
export interface ExchangeRequest {
ok: boolean;
integration: {
imsEndpoint: string;
metascopes: string;
technicalAccount: {
clientId: string;
clientSecret: string;
};
email: string;
id: string;
org: string;
privateKey: string;
publicKey: string;
certificateExpirationDate: string;
};
statusCode: number;
}
export interface ExchangeResponse {
access_token: string;
expires_in: number;
token_type: 'bearer';
}
function exchange(config: ExchangeRequest): Promise<ExchangeResponse>;
export = exchange;
}
Into a .d.ts
file
NPM package is published
NPM package is not published
We can install this package from npm:
const exchange = require("@adobe/aemcs-api-client-lib");
What are the plans for publishing this as an npm package?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.