@@ -13,9 +13,11 @@ import type { AddClientAuthentication, OAuthClientProvider } from './auth.js';
1313/**
1414 * Helper to produce a private_key_jwt client authentication function.
1515 *
16- * Usage:
17- * const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
18- * // pass addClientAuth as provider.addClientAuthentication implementation
16+ * @example
17+ * ```typescript
18+ * const addClientAuth = createPrivateKeyJwtAuth({ issuer, subject, privateKey, alg, audience? });
19+ * // pass addClientAuth as provider.addClientAuthentication implementation
20+ * ```
1921 */
2022export function createPrivateKeyJwtAuth ( options : {
2123 issuer : string ;
@@ -114,6 +116,7 @@ export interface ClientCredentialsProviderOptions {
114116 * the client authenticates using a client_id and client_secret.
115117 *
116118 * @example
119+ * ```typescript
117120 * const provider = new ClientCredentialsProvider({
118121 * clientId: 'my-client',
119122 * clientSecret: 'my-secret'
@@ -122,6 +125,7 @@ export interface ClientCredentialsProviderOptions {
122125 * const transport = new StreamableHTTPClientTransport(serverUrl, {
123126 * authProvider: provider
124127 * });
128+ * ```
125129 */
126130export class ClientCredentialsProvider implements OAuthClientProvider {
127131 private _tokens ?: OAuthTokens ;
@@ -222,6 +226,7 @@ export interface PrivateKeyJwtProviderOptions {
222226 * the client authenticates using a signed JWT assertion (RFC 7523 Section 2.2).
223227 *
224228 * @example
229+ * ```typescript
225230 * const provider = new PrivateKeyJwtProvider({
226231 * clientId: 'my-client',
227232 * privateKey: pemEncodedPrivateKey,
@@ -231,6 +236,7 @@ export interface PrivateKeyJwtProviderOptions {
231236 * const transport = new StreamableHTTPClientTransport(serverUrl, {
232237 * authProvider: provider
233238 * });
239+ * ```
234240 */
235241export class PrivateKeyJwtProvider implements OAuthClientProvider {
236242 private _tokens ?: OAuthTokens ;
0 commit comments