-
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
docs: auth decorator with multiple strategies #6142
Conversation
@@ -73,7 +83,7 @@ export class WhoAmIController { | |||
An example of the decorator when options **are** specified looks like this: | |||
|
|||
```ts | |||
@authenticate('basic', { /* some options for the strategy */}) | |||
@authenticate({'basic', { /* some options for the strategy */}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{name: 'basic', options: { /* some options for the strategy */ }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 👍
cde66ee
to
67ce05c
Compare
```ts | ||
@authenticate(metadata: AuthenticationMetadata) | ||
``` | ||
- single strategy: `@authenticate(strategyName)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can group the single strategy with and without options together? likewise for the multiple strategies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @dhmlau changed.
Signed-off-by: jannyHou <[email protected]>
67ce05c
to
a5fc169
Compare
Update auth decorator docs to include multiple strategies.
This adds docs for PR #5735
Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈