Skip to content

Implement test for app-b Bearer token usage#51

Open
drQedwards wants to merge 1 commit intoxdevplatform:mainfrom
drQedwards:patch-3
Open

Implement test for app-b Bearer token usage#51
drQedwards wants to merge 1 commit intoxdevplatform:mainfrom
drQedwards:patch-3

Conversation

@drQedwards
Copy link
Copy Markdown

This pull request adds a new test to ensure that when multiple apps are configured with different authentication methods, the API client correctly uses the Bearer token for an app that only has a Bearer token, even if the default app has OAuth2 credentials.

Authentication handling improvements:

  • Added a new test, TestTC5_3_ApiClientUsesAppBBearerNotDefaultOAuth2, to verify that when switching from a default app with OAuth2 credentials to another app (app-b) with only a Bearer token, the API client uses the correct Bearer token for authentication instead of falling back to the default app's OAuth2 token.
  • Introduced a helper function futureExpiry to generate a future expiration timestamp for OAuth2 tokens in tests.

Test utilities:

  • Added the time package import to support token expiration handling in tests.Add test for ApiClient using app-b's Bearer token instead of app-a's OAuth2.

Add test for ApiClient using app-b's Bearer token instead of app-a's OAuth2.

Signed-off-by: Dr. Q and Company <trompeter68co@yahoo.com>
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.

1 participant