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

docs: auth decorator with multiple strategies #6142

Merged
merged 1 commit into from
Aug 19, 2020
Merged

Conversation

jannyHou
Copy link
Contributor

@jannyHou jannyHou commented Aug 18, 2020

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 machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@@ -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 */}})
Copy link
Contributor

@raymondfeng raymondfeng Aug 18, 2020

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 */ }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch 👍

@jannyHou jannyHou force-pushed the docs/auth-update branch 2 times, most recently from cde66ee to 67ce05c Compare August 19, 2020 13:38
```ts
@authenticate(metadata: AuthenticationMetadata)
```
- single strategy: `@authenticate(strategyName)`
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @dhmlau changed.

@raymondfeng raymondfeng merged commit 1d71761 into master Aug 19, 2020
@raymondfeng raymondfeng deleted the docs/auth-update branch August 19, 2020 21:49
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