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: validate oauth scope format #51

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

MichaelGoberling
Copy link
Contributor

@MichaelGoberling MichaelGoberling commented Jan 31, 2024

Description

Use a regex to validate the oauth scopes format (comma-separated list with no quotes/double-quotes)

(Note: scope validation is already supported with the deprecated jwt step, this is bringing oauth up to par with that)

Related Issue

ACNA-2762

Motivation and Context

How Has This Been Tested?

npm run test

Real valid scope format run

Real invalid scope format run

Real invalid scope format run, specifically using the deprecated jwt format

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c18dda0) 100.00% compared to head (6c47447) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #51   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          102       104    +2     
  Branches        17        17           
=========================================
+ Hits           102       104    +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichaelGoberling MichaelGoberling merged commit 757289c into master Feb 1, 2024
7 checks passed
@MichaelGoberling MichaelGoberling deleted the validate-oauth-scope-format branch February 1, 2024 22:31
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.

3 participants