Skip to content

Conversation

paragon
Copy link
Contributor

@paragon paragon commented Jun 3, 2025

This change is underpinned by a new ScopeDescriptions map on the Security struct that contains a mapping of scope => scopeDescription.

We leverage this in three areas:

  1. When there are one or more scopes with a description, we create a type ScopeName = string alias.
  2. Using the ScopeName alias, we iterate over all Scopes and create consts for each Scope (with its corresponding scope string) and create a Map containing a mapping of ScopeName => ScopeDescription.
  3. We update the oauth2Scopes Map to include ScopeName aliased Scopes, rather than raw strings.

@paragon paragon force-pushed the feat/oauth-scope-descriptions branch from e2b50b1 to edc6bb1 Compare June 3, 2025 02:04
@paragon paragon changed the title (feat) Generate OAuth2 Scopes and Descriptions variables (feat) generate OAuth2 Scopes and Descriptions variables Jun 3, 2025
@paragon paragon force-pushed the feat/oauth-scope-descriptions branch from edc6bb1 to 7b80842 Compare June 3, 2025 02:08
@paragon paragon changed the title (feat) generate OAuth2 Scopes and Descriptions variables feat: generate OAuth2 Scopes and Descriptions variables Jun 3, 2025
@paragon paragon force-pushed the feat/oauth-scope-descriptions branch 4 times, most recently from 21830b0 to 595f7e9 Compare June 7, 2025 04:05
@paragon paragon force-pushed the feat/oauth-scope-descriptions branch from 595f7e9 to c9b2d8e Compare June 10, 2025 00:49
@paragon paragon marked this pull request as draft July 1, 2025 22:32
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