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

api/auth: Allow authorization to be used for viewership metrics API #1279

Merged
merged 10 commits into from
Sep 16, 2022

Conversation

victorges
Copy link
Member

What does this pull request do? Explain your changes. (required)
This allows the authorization API, currently used for stream health, to also
be used for the viewership API. This mostly means adding support for authorizing
access to a given asset as well, not only to a stream. Also adding CORS support
on the analyzer endpoint.

This goes together with livepeer/livepeer-data#60

Specific updates (required)

  • Allow auth API to receive an asset ID not only a stream ID
  • Allow CORS on the viewership API

-

  • How did you test each of these updates (required)
  • yarn test
  • also deployed to staging to check functionality

Does this pull request close any open issues?
Closes #1278

Checklist:

  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@victorges victorges requested a review from a team as a code owner September 15, 2022 23:01
@vercel
Copy link

vercel bot commented Sep 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
livepeer-studio ✅ Ready (Inspect) Visit Preview Sep 16, 2022 at 9:50PM (UTC)

@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #1279 (345898e) into master (5229117) will increase coverage by 0.31054%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #1279         +/-   ##
===================================================
+ Coverage   51.06138%   51.37192%   +0.31054%     
===================================================
  Files             66          66                 
  Lines           4334        4337          +3     
  Branches         786         786                 
===================================================
+ Hits            2213        2228         +15     
+ Misses          1842        1830         -12     
  Partials         279         279                 
Impacted Files Coverage Δ
packages/api/src/controllers/auth.ts 100.00000% <100.00000%> (+80.00000%) ⬆️
packages/api/src/middleware/auth.ts 91.34615% <100.00000%> (+3.72709%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5229117...345898e. Read the comment docs.

Impacted Files Coverage Δ
packages/api/src/controllers/auth.ts 100.00000% <100.00000%> (+80.00000%) ⬆️
packages/api/src/middleware/auth.ts 91.34615% <100.00000%> (+3.72709%) ⬆️

Copy link
Member

@gioelecerati gioelecerati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adamsoffer adamsoffer self-requested a review September 16, 2022 17:33
Copy link
Member

@adamsoffer adamsoffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@victorges victorges requested a review from a team as a code owner September 16, 2022 18:16
@victorges victorges merged commit d1cbc12 into master Sep 16, 2022
@victorges victorges deleted the vg/feat/viewership-asst-auth branch September 16, 2022 22:12
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.

api: Allow authorization and CORS on the viewership API
3 participants