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

feat: handle v2 access tokens and api keys using BearerGuard #14643

Closed
wants to merge 3 commits into from

Conversation

supalarry
Copy link
Contributor

What does this PR do?

Combine AccessTokenStrategy and ApiKeyStrategy into BearerStrategy that can be applied to be used by v1 and v2 calls.

Copy link
Contributor

github-actions bot commented Apr 17, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@keithwillcode keithwillcode added core area: core, team members only platform Anything related to our platform plan labels Apr 17, 2024
Copy link

vercel bot commented Apr 17, 2024

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

Name Status Preview Comments Updated (UTC)
platform-starter-kit ❌ Failed (Inspect) Apr 18, 2024 0:57am
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 0:57am
cal ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 0:57am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 18, 2024 0:57am

Copy link
Contributor

github-actions bot commented Apr 17, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

deploysentinel bot commented Apr 17, 2024

Current Playwright Test Results Summary

✅ 307 Passing - ❌ 1 Failing - ⚠️ 9 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 04/18/2024 01:12:34pm UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: 035471a

Started: 04/18/2024 01:08:16pm UTC

❌ Failures

📄   packages/embeds/embed-react/playwright/tests/basic.e2e.ts • 1 Failure

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
React Embed Element Click Popup should verify that the iframe got created with correct URL - namespaced
Retry 2Retry 1Initial Attempt
Error: Expected to provide an iframe, got null
Expected to provide an iframe, got null
28.57% (6) 6 / 21 runs
failed over last 7 days
42.86% (9) 9 / 21 runs
flaked over last 7 days

⚠️ Flakes

📄   apps/web/playwright/event-types.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Event Types tests -- legacy user Different Locations Tests Can remove location from multiple locations that are saved
Retry 1Initial Attempt
0% (0) 0 / 291 runs
failed over last 7 days
22.34% (65) 65 / 291 runs
flaked over last 7 days

📄   apps/web/playwright/login.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Login and logout tests -- future Login flow validations -- future Should warn when user does not exist
Retry 1Initial Attempt
0.34% (1) 1 / 297 run
failed over last 7 days
6.73% (20) 20 / 297 runs
flaked over last 7 days

📄   apps/web/playwright/profile.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Update Profile Can update a users email (verification enabled)
Retry 2Retry 1Initial Attempt
6.44% (19) 19 / 295 runs
failed over last 7 days
25.08% (74) 74 / 295 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/namespacing.e2e.ts • 4 Flakes

Top 1 Common Error Messages

null

4 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Namespacing Inline Embed Double install Embed Snippet with inline embed without a namespace(i.e. default namespace)
Retry 1Initial Attempt
0% (0) 0 / 18 runs
failed over last 7 days
50% (9) 9 / 18 runs
flaked over last 7 days
Namespacing Different namespaces can have different init configs
Retry 1Initial Attempt
0% (0) 0 / 18 runs
failed over last 7 days
55.56% (10) 10 / 18 runs
flaked over last 7 days
Namespacing Inline Embed Double install Embed Snippet with inline embed using a namespace
Retry 1Initial Attempt
0% (0) 0 / 18 runs
failed over last 7 days
44.44% (8) 8 / 18 runs
flaked over last 7 days
Namespacing Inline Embed Add inline embed using a namespace without reload
Retry 1Initial Attempt
0% (0) 0 / 18 runs
failed over last 7 days
44.44% (8) 8 / 18 runs
flaked over last 7 days

📄   apps/web/playwright/integrations-stripe.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Stripe integration Can book a paid booking
Retry 1Initial Attempt
3.90% (12) 12 / 308 runs
failed over last 7 days
39.61% (122) 122 / 308 runs
flaked over last 7 days

📄   apps/web/playwright/teams.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Teams - NonOrg -- future Team Onboarding Invite Members
Retry 1Initial Attempt
5.75% (18) 18 / 313 runs
failed over last 7 days
36.74% (115) 115 / 313 runs
flaked over last 7 days

View Detailed Build Results


let bearerTokenUser: UserWithProfile;

if (!bearerToken) {
throw new UnauthorizedException(INVALID_ACCESS_TOKEN);
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe rename this error to invalid authentication credentials

Copy link
Contributor

github-actions bot commented May 3, 2024

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label May 3, 2024
@supalarry supalarry closed this May 9, 2024
@supalarry supalarry deleted the bearer-guard branch May 9, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only platform Anything related to our platform plan Stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants