Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accept a function as token #1069

Merged
merged 1 commit into from
Jan 10, 2025
Merged

accept a function as token #1069

merged 1 commit into from
Jan 10, 2025

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
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?
2 participants