@@ -21,29 +21,37 @@ Application.Run();
21
21
The unique name of this API within the app. Subsequent calls to ` api ` with
22
22
the same name will return the same object.
23
23
</Property >
24
- <Property
25
- name = " securityDefinitions"
26
- type = " Dictionary<string, SecurityDefinition>"
27
- >
28
- Security definitions defined by this API.
29
- </Property >
30
- <Property name = " security" type = " Dictionary<string, string[]>" >
31
- Security rules to apply with scopes to the entire API. Keys must match a
32
- ` securityDefinition ` .
33
- </Property >
34
- <Property name = " SecurityDefinition" >
35
- A ` SecurityDefinition ` object is one of the following:
24
+ <Property name = " ApiOptions" >
25
+ A set of options for configuring the API.
36
26
<Properties nested >
37
- <Property name = " issuer" type = " string" >
38
- The issuer for the JWT tokens e.g. ` https://account.region.auth0.com ` .
27
+ <Property name = " security" type = " OidcOptions[]" >
28
+ Security options for the API.
29
+ <Properties nested >
30
+ <Property name = " name" type = " string" >
31
+ The name of the security option.
32
+ </Property >
33
+ <Property name = " audiences" type = " string[]" >
34
+ The audience (` aud ` ) claims that the issued JWT tokens must contain.
35
+ </Property >
36
+ <Property name = " issuer" type = " string" >
37
+ The URL of the token issuer, e.g., ` https://example-issuer.com ` .
38
+ </Property >
39
+ <Property name = " scopes" type = " string[]" >
40
+ A list of required scopes to access the API. Users must have these scopes in their tokens.
41
+ </Property >
42
+ </Properties >
39
43
</Property >
40
- <Property name = " audiences" type = " string[]" >
41
- The ` aud ` that will be applied to JWT tokens from the issuer.
44
+ <Property name = " basePath" type = " string" >
45
+ The base path for the API.
46
+ </Property >
47
+ <Property name = " middleware" type = " Middleware<HttpContext>[]" >
48
+ Middleware applied to the API.
42
49
</Property >
43
50
</Properties >
44
51
</Property >
45
52
</Properties >
46
53
54
+
47
55
## Notes
48
56
49
57
The ` middleware ` property on the ` options ` param is useful for applying universal middleware such as CORS headers or Auth, across an entire API from a single place.
0 commit comments