Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 779110b

Browse files
committed
Fix API parameters to match SDK
1 parent ca4da8c commit 779110b

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

docs/reference/csharp/api/api.mdx

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,47 @@ Application.Run();
1717
## Parameters
1818

1919
<Properties>
20-
<Property name="name" type="string" required>
20+
<Property name="name" required type="string">
2121
The unique name of this API within the app. Subsequent calls to `api` with
2222
the same name will return the same object.
2323
</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="options" type="object">
25+
Additional options when creating the API.
3626
<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="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.
3935
</Property>
40-
<Property name="audiences" type="string[]">
41-
The `aud` that will be applied to JWT tokens from the issuer.
36+
<Property name="security" type="OidcOptions[]">
37+
Security rules to apply with scopes to the entire API.
4238
</Property>
4339
</Properties>
4440
</Property>
4541
</Properties>
4642

43+
### OidcOptions Parameters
44+
45+
<Properties>
46+
<Property name="name" required type="string">
47+
the name of the security definition
48+
</Property>
49+
<Property name="issuer" required type="string">
50+
the issuer for the JWT tokens e.g.{' '}
51+
<code>https://account.region.auth0.com</code>
52+
</Property>
53+
<Property name="audiences" required type="string[]">
54+
the <code>aud</code> that will be applied to JWT tokens from the issuer.
55+
</Property>
56+
<Property name="scopes" required type="string[]">
57+
the scopes that will be required to authenticate.
58+
</Property>
59+
</Properties>
60+
4761
## Notes
4862

4963
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

Comments
 (0)