-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Extend authentication decorator to apply security to operations #4990
Comments
I was looking for this. As you say #4693 allows the strategy to define the scheme to the specs. I think that every @authenticate('strategyName') should allow the target strategy to merge its security spec to the decorated path. |
@dougal83 Thank you for opening this feature. Improving Another approach to consider: introducing a new decorator E.g. // specify a name then the enhancer fills in the spec
@security('jwt')
// or provide the spec directly
@security(security_spec_object)
@authentication('jwt')
whoAmI(@inject(SECURITY_BINDINGS.USER)user: UserProfile) {
console.log(this.user)
} |
And for @Salketer 's suggestion 👍 :
Yes in this case the enhancer could infer and fill in the spec by |
@jannyHou Personally I'd like to see both the |
@jannyHou could you please fill in the acceptance criteria for this issue ? |
@dougal83 @raymondfeng what do think about extending the |
This issue has been marked stale because it has not seen activity within six months. If you believe this to be in error, please contact one of the code owners, listed in the |
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the |
Suggestion
Extend @authenticate decorator to apply security to operations. Initial iteration could start with
http
authentications schemes and possibly extended to rudimentary baseapiKey
scheme implementation. A caveat is that asecuritySchemes
object must be provided by the authentication strategy.Further expansion later for other schemes in the auth specification docs.
Related:
#4416 feat: adds @tags convenience decorator
#4693 feat(Authentication) enable authentication strategies to contribute OASEnhancer
Acceptance criteria
TBD - will be filled by the team.
The text was updated successfully, but these errors were encountered: