@musallam/ims-client
    Preparing search index...

    @musallam/ims-client

    @musallam/ims-client

    TypeScript client library for Adobe IMS (Identity Management Services) authentication and token management.

    This package is part of the firefly-services-clients monorepo.

    • 🚀 Full TypeScript support with auto-complete and type safety
    • 🔐 Simple acquisition and refresh of IMS access tokens
    • 🔄 Automatic token management utilities
    • 🧩 Works seamlessly with other firefly-services client packages
    npm install @musallam/ims-client
    
    import { TokenIMSClient } from '@musallam/ims-client';

    // 1. Instantiate the IMS client
    const imsClient = new TokenIMSClient({
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    scopes: ['openid', 'creative_sdk', 'AdobeID'],
    });

    // 2. Acquire an access token
    const accessToken = await imsClient.getAccessToken();
    console.log('IMS Token:', accessToken);

    // Tokens are cached and automatically refreshed before expiry
    • constructor(options)
      • clientId (string)
      • clientSecret (string)
      • scopes (string[])
    • getAccessToken(): Promise<string>
      • Fetches a valid (cached or new) IMS access token.
    import {
    StorageAndCollaborationClient,
    STORAGE_AXIOS_INSTANCE,
    } from '@musallam/storage-and-collaboration-client';
    import { TokenIMSClient } from '@musallam/ims-client';

    const imsClient = new TokenIMSClient({
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    scopes: ['openid', 'creative_sdk', 'AdobeID'],
    });

    STORAGE_AXIOS_INSTANCE.interceptors.request.use(async (config) => {
    const token = await imsClient.getAccessToken();
    config.headers.Authorization = `Bearer ${token}`;
    return config;
    });

    For full API documentation, see: https://ahmed-musallam.github.io/firefly-services-clients/ims-client/