feat: preauthorization (#4339)

* feat: swagger 2.0 preauthorization methods
* tests: add cases for oas3 preauthorization
* docs: add new preauth docs; touch up existing auth docs
* tests: add `rootInject` tests
* docs: remove unfinished sentence
This commit is contained in:
kyle
2018-03-16 22:25:04 -07:00
committed by GitHub
parent 624a81201f
commit 245428e7cd
5 changed files with 241 additions and 4 deletions

View File

@@ -78,3 +78,9 @@ Parameter Name | Description
--- | ---
`modelPropertyMacro` | `Function`. Function to set default values to each property in model. Accepts one argument modelPropertyMacro(property), property is immutable
`parameterMacro` | `Function`. Function to set default value to parameters. Accepts two arguments parameterMacro(operation, parameter). Operation and parameter are objects passed for context, both remain immutable
### Instance methods
`initOAuth` | Provide Swagger-UI with information about your OAuth server - see the OAuth2 documentation for more information.
`preauthorizeBasic` | Programmatically set values for a Basic authorization scheme.
`preauthorizeApiKey` | Programmatically set values for an API key authorization scheme.