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

Allow security scopes on BasicAuth and APIKey authentication #2120

Merged
merged 6 commits into from May 30, 2019

Conversation

cubic3d
Copy link
Contributor

@cubic3d cubic3d commented May 24, 2019

This PR resolves #2105 and allows to define Scope on BasicAuth and APIKeyAuth definitions.

Description on endpoint now contains the Security name to distinguish between the methods. Additionally consistent formatting is applied to descriptions containing security scopes.

Copy link
Member

@raphael raphael left a comment

Choose a reason for hiding this comment

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

This looks great, thank you! I left a couple of suggestions.

dsl/security.go Outdated Show resolved Hide resolved
http/codegen/openapi/openapi_v2_builder.go Outdated Show resolved Hide resolved
@cubic3d
Copy link
Contributor Author

cubic3d commented May 27, 2019

Thank you! I made the changes.

@raphael
Copy link
Member

raphael commented May 30, 2019

Looks great! thank you. Do you think you could backport these changes to v2 as well? Simply cherry-pick the merge commit into a branch created off of v2. Thank you!

@raphael raphael merged commit 1a90d37 into goadesign:v3 May 30, 2019
cubic3d added a commit to cubic3d/goa that referenced this pull request Jun 21, 2019
…gn#2120)

* Added scopes support in BasicAuth and APIKeyAuth for custom usage

* Fixed consistency between endpoint and auth schema generated descriptions

* Fixed comments on scheme Validate

* Fixed font weight on endpoint description

* Changed Scope docs, added to "must appear" list

* Refactored scope description generation
@cubic3d
Copy link
Contributor Author

cubic3d commented Jun 21, 2019

@raphael Sorry for the late reaction, had some time off ;) back port in #2162

raphael pushed a commit that referenced this pull request Jul 14, 2019
…2162)

* Added scopes support in BasicAuth and APIKeyAuth for custom usage

* Fixed consistency between endpoint and auth schema generated descriptions

* Fixed comments on scheme Validate

* Fixed font weight on endpoint description

* Changed Scope docs, added to "must appear" list

* Refactored scope description generation
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.

v3: Using BasicAuth with custom scopes
2 participants