@@ -14,8 +14,13 @@ import type { AddClientAuthentication, OAuthClientProvider } from './auth.js';
1414 * Helper to produce a `private_key_jwt` client authentication function.
1515 *
1616 * @example
17- * ```typescript
18- * const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
17+ * ```ts source="./authExtensions.examples.ts#createPrivateKeyJwtAuth_basicUsage"
18+ * const addClientAuth = createPrivateKeyJwtAuth({
19+ * issuer: 'my-client',
20+ * subject: 'my-client',
21+ * privateKey: pemEncodedPrivateKey,
22+ * alg: 'RS256'
23+ * });
1924 * // pass addClientAuth as provider.addClientAuthentication implementation
2025 * ```
2126 */
@@ -116,14 +121,14 @@ export interface ClientCredentialsProviderOptions {
116121 * the client authenticates using a `client_id` and `client_secret`.
117122 *
118123 * @example
119- * ```typescript
124+ * ```ts source="./authExtensions.examples.ts#ClientCredentialsProvider_basicUsage"
120125 * const provider = new ClientCredentialsProvider({
121- * clientId: 'my-client',
122- * clientSecret: 'my-secret'
126+ * clientId: 'my-client',
127+ * clientSecret: 'my-secret'
123128 * });
124129 *
125130 * const transport = new StreamableHTTPClientTransport(serverUrl, {
126- * authProvider: provider
131+ * authProvider: provider
127132 * });
128133 * ```
129134 */
@@ -227,15 +232,15 @@ export interface PrivateKeyJwtProviderOptions {
227232 * ({@link https://datatracker.ietf.org/doc/html/rfc7523#section-2.2 | RFC 7523 Section 2.2}).
228233 *
229234 * @example
230- * ```typescript
235+ * ```ts source="./authExtensions.examples.ts#PrivateKeyJwtProvider_basicUsage"
231236 * const provider = new PrivateKeyJwtProvider({
232- * clientId: 'my-client',
233- * privateKey: pemEncodedPrivateKey,
234- * algorithm: 'RS256'
237+ * clientId: 'my-client',
238+ * privateKey: pemEncodedPrivateKey,
239+ * algorithm: 'RS256'
235240 * });
236241 *
237242 * const transport = new StreamableHTTPClientTransport(serverUrl, {
238- * authProvider: provider
243+ * authProvider: provider
239244 * });
240245 * ```
241246 */
0 commit comments