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

EventsSDK: Revise Authorization in AnalyticsConfig #124

Merged
merged 3 commits into from
Jan 26, 2024
Merged

EventsSDK: Revise Authorization in AnalyticsConfig #124

merged 3 commits into from
Jan 26, 2024

Conversation

ejaffee01
Copy link
Contributor

Previously we had to fields in AnalyticsConfig that we're optional, key and bearer, where we throw an error if none or both are set. This change updates the interface so it is more clear that only one is required. There is now authorizationType which is either a string apiKey or Bearer and authorization which is the token itself. We need authorizationType so we can append the proper prefix of KEY or Bearer to the final authorization property to avoid passing this work onto the user. This also updates necessary test files to reflect this change, and removes logic for ensuring that only one of key or bearer is set.

J=FUS-6201
R=abenno, mtian, mkilpatrick
TEST=auto

src/AnalyticsConfig.ts Outdated Show resolved Hide resolved
src/AnalyticsEventReporter.ts Show resolved Hide resolved
@ejaffee01 ejaffee01 merged commit e5bd3d6 into main Jan 26, 2024
14 checks passed
@ejaffee01 ejaffee01 deleted the config branch January 26, 2024 19:43
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.

None yet

2 participants