Skip to content

Conversation

@tusharpandey13
Copy link
Contributor

@tusharpandey13 tusharpandey13 commented Jan 10, 2025

Allow a sync/async function as token.

Changes

  • Modified management client options and management client middleware to accept a function as a token.

Context

This was removed in this commit

Fixes #1050

Tests:

PASSING

Test Suites: 45 passed, 45 total
Tests:       1441 passed, 1441 total
Snapshots:   0 total
Time:        6.842 s, estimated 7 s
Ran all test suites.

Sample:

const managementClient: ManagementClient = new ManagementClient({
    domain: `testdomain`,
    token: async () => 'testtoken',
});

@tusharpandey13 tusharpandey13 requested a review from a team as a code owner January 10, 2025 09:37
@tusharpandey13 tusharpandey13 merged commit 4b99afd into master Jan 10, 2025
4 checks passed
@tusharpandey13 tusharpandey13 deleted the fix/tokenAsFunction branch January 10, 2025 09:45
@tusharpandey13 tusharpandey13 mentioned this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can I custom access token retrieval Process in ManagementClient?

3 participants