From 0bcd57643d42ab3eed07e88df097bc369d9d1a73 Mon Sep 17 00:00:00 2001 From: moritzraho Date: Mon, 9 Feb 2026 11:34:16 +0100 Subject: [PATCH 1/3] feat: aio-lib-core-auth --- README.md | 6 +++++- package.json | 3 ++- src/index.js | 9 ++++++++- test/index.test.js | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 51b9d5d..fede63f 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Here is a snippet: ```javascript const CoreSdk = require('@adobe/aio-sdk-core') // OR ... -const { Config, Errors, TVMClient, Logger, HttpClient } = require('@adobe/aio-sdk-core') +const { Config, Errors, TVMClient, Logger, HttpClient, AuthClient } = require('@adobe/aio-sdk-core') // set a Config key value CoreSdk.Config.set('my.token', 1234) @@ -58,6 +58,10 @@ myAppLogger.info('Hello, Dave.') // create own reference variable to call HttpClient for exponential backoff const httpClient = CoreSdk.HttpClient const response = await httpClient.exponentialBackoff('url', {method: 'GET'}) + +// generate an IMS token using the AuthClient +const authClient = CoreSdk.AuthClient +const token = await const token = await generateAccessToken({ clientId, clientSecret, orgId, scopes }) ``` ## Explore diff --git a/package.json b/package.json index e0ea5f3..e767a77 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "@adobe/aio-lib-core-errors": "^4", "@adobe/aio-lib-core-logging": "^3", "@adobe/aio-lib-core-networking": "^5", - "@adobe/aio-lib-core-tvm": "^4" + "@adobe/aio-lib-core-tvm": "^4", + "@adobe/aio-lib-core-auth": "^1" }, "devDependencies": { "@adobe/eslint-config-aio-lib-config": "^4.0.0", diff --git a/src/index.js b/src/index.js index 1e585b2..ea712c6 100755 --- a/src/index.js +++ b/src/index.js @@ -14,6 +14,7 @@ const Config = require('@adobe/aio-lib-core-config') const TVMClient = require('@adobe/aio-lib-core-tvm') const Logger = require('@adobe/aio-lib-core-logging') const HttpClient = require('@adobe/aio-lib-core-networking') +const AuthClient = require('@adobe/aio-lib-core-auth') /** @module @adobe/aio-sdk-core */ module.exports = { @@ -46,5 +47,11 @@ module.exports = { * * @see {@link https://github.com/adobe/aio-lib-core-networking/blob/master/README.md|@adobe/aio-lib-core-networking} */ - HttpClient + HttpClient, + /** + * The Auth Module of the Adobe I/O Core SDK + * + * @see {@link https://github.com/adobe/aio-lib-core-auth/blob/master/README.md|@adobe/aio-lib-core-auth} + */ + AuthClient } diff --git a/test/index.test.js b/test/index.test.js index 8f19248..3e76fd6 100755 --- a/test/index.test.js +++ b/test/index.test.js @@ -17,4 +17,5 @@ test('module existence', () => { expect(core.TVMClient).toBeTruthy() expect(core.Logger).toBeTruthy() expect(core.HttpClient).toBeTruthy() + expect(core.AuthClient).toBeTruthy() }) From 6dcf512dc17426c429ee49e7037ff7f6223e8c1c Mon Sep 17 00:00:00 2001 From: moritzraho Date: Mon, 9 Feb 2026 12:08:24 +0100 Subject: [PATCH 2/3] linting --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ea712c6..893e9df 100755 --- a/src/index.js +++ b/src/index.js @@ -48,7 +48,7 @@ module.exports = { * @see {@link https://github.com/adobe/aio-lib-core-networking/blob/master/README.md|@adobe/aio-lib-core-networking} */ HttpClient, - /** + /** * The Auth Module of the Adobe I/O Core SDK * * @see {@link https://github.com/adobe/aio-lib-core-auth/blob/master/README.md|@adobe/aio-lib-core-auth} From d8b75e96360202abb45eaf0e29cc8cf22f67d43b Mon Sep 17 00:00:00 2001 From: moritzraho Date: Wed, 11 Feb 2026 17:54:27 +0100 Subject: [PATCH 3/3] fix comment --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fede63f..f4a5ab1 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,11 @@ myAppLogger.info('Hello, Dave.') // create own reference variable to call HttpClient for exponential backoff const httpClient = CoreSdk.HttpClient -const response = await httpClient.exponentialBackoff('url', {method: 'GET'}) +const response = await httpClient.exponentialBackoff('url', { method: 'GET' }) // generate an IMS token using the AuthClient const authClient = CoreSdk.AuthClient -const token = await const token = await generateAccessToken({ clientId, clientSecret, orgId, scopes }) +const token = await generateAccessToken({ clientId, clientSecret, orgId, scopes }, imsEnv = 'prod') ``` ## Explore