You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
Security rules to apply with scopes to the entire API. Keys must match a
32
-
`securityDefinition`.
33
-
</Property>
34
-
<Propertyname="SecurityDefinition">
35
-
A `SecurityDefinition` object is one of the following:
24
+
<Propertyname="options"type="object">
25
+
Additional options when creating the API.
36
26
<Propertiesnested>
37
-
<Propertyname="issuer"type="string">
38
-
The issuer for the JWT tokens e.g. `https://account.region.auth0.com`.
27
+
<Propertyname="basePath"type="string">
28
+
Base path for all routes in the API.
29
+
</Property>
30
+
<Property
31
+
name="middleware"
32
+
type="Middleware<HttpContext>[] or Middleware<HttpContext>"
33
+
>
34
+
Middleware to apply to all routes and methods of the API.
39
35
</Property>
40
-
<Propertyname="audiences"type="string[]">
41
-
The `aud` that will be applied to JWT tokens from the issuer.
36
+
<Propertyname="security"type="OidcOptions[]">
37
+
Security rules to apply with scopes to the entire API.
42
38
</Property>
43
39
</Properties>
44
40
</Property>
45
41
</Properties>
46
42
43
+
### OidcOptions Parameters
44
+
45
+
<Properties>
46
+
<Propertyname="name"requiredtype="string">
47
+
the name of the security definition
48
+
</Property>
49
+
<Propertyname="issuer"requiredtype="string">
50
+
the issuer for the JWT tokens e.g.{''}
51
+
<code>https://account.region.auth0.com</code>
52
+
</Property>
53
+
<Propertyname="audiences"requiredtype="string[]">
54
+
the <code>aud</code> that will be applied to JWT tokens from the issuer.
55
+
</Property>
56
+
<Propertyname="scopes"requiredtype="string[]">
57
+
the scopes that will be required to authenticate.
58
+
</Property>
59
+
</Properties>
60
+
47
61
## Notes
48
62
49
63
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