@@ -22,7 +22,7 @@ import { Server } from "./server.js";
22
22
import logger from "../logger.js" ;
23
23
24
24
/**
25
- * Configuration interface for AutomatedOAuth
25
+ * Configuration interface for AutomatedOAuthClient
26
26
*/
27
27
export interface AutomatedOAuthConfig {
28
28
// Lookup server URL from a CloudFormation stack
@@ -42,7 +42,7 @@ export interface AutomatedOAuthConfig {
42
42
* - Client ID: CloudFormation stack output 'AutomatedOAuthClientId' from 'LambdaMcpServer-Auth' stack
43
43
* - Client Secret: AWS Secrets Manager secret (ARN from CloudFormation stack output 'OAuthClientSecretArn')
44
44
*/
45
- export class AutomatedOAuth extends Server {
45
+ export class AutomatedOAuthClient extends Server {
46
46
private oauthProvider ?: AutomatedOAuthClientProvider ;
47
47
48
48
// Lookup server URL from a CloudFormation stack
@@ -104,7 +104,9 @@ export class AutomatedOAuth extends Server {
104
104
logger . debug ( "Starting automated OAuth flow..." ) ;
105
105
await this . attemptConnection ( ) ;
106
106
} catch ( error ) {
107
- logger . error ( `Error initializing automated OAuth server ${ this . name } : ${ error } ` ) ;
107
+ logger . error (
108
+ `Error initializing automated OAuth server ${ this . name } : ${ error } `
109
+ ) ;
108
110
throw error ;
109
111
}
110
112
}
@@ -187,7 +189,7 @@ export class AutomatedOAuth extends Server {
187
189
try {
188
190
// First get the secret ARN from CloudFormation
189
191
logger . debug ( "Retrieving client secret ARN from CloudFormation..." ) ;
190
-
192
+
191
193
const cloudFormationClient = new CloudFormationClient ( {
192
194
region : this . authStackRegion ,
193
195
} ) ;
@@ -226,7 +228,7 @@ export class AutomatedOAuth extends Server {
226
228
227
229
// Now get the secret value from Secrets Manager
228
230
logger . debug ( "Retrieving client secret from Secrets Manager..." ) ;
229
-
231
+
230
232
const secretsManagerClient = new SecretsManagerClient ( {
231
233
region : this . authStackRegion ,
232
234
} ) ;
@@ -443,16 +445,22 @@ class AutomatedOAuthClientProvider implements OAuthClientProvider {
443
445
444
446
redirectToAuthorization ( authorizationUrl : URL ) : void {
445
447
// Not used in client credentials flow - no user interaction
446
- throw new Error ( "redirectToAuthorization should not be called in automated OAuth flow" ) ;
448
+ throw new Error (
449
+ "redirectToAuthorization should not be called in automated OAuth flow"
450
+ ) ;
447
451
}
448
452
449
453
saveCodeVerifier ( codeVerifier : string ) : void {
450
454
// Not used in client credentials flow
451
- throw new Error ( "saveCodeVerifier should not be called in automated OAuth flow" ) ;
455
+ throw new Error (
456
+ "saveCodeVerifier should not be called in automated OAuth flow"
457
+ ) ;
452
458
}
453
459
454
460
codeVerifier ( ) : string {
455
461
// Not used in client credentials flow
456
- throw new Error ( "codeVerifier should not be called in automated OAuth flow" ) ;
462
+ throw new Error (
463
+ "codeVerifier should not be called in automated OAuth flow"
464
+ ) ;
457
465
}
458
466
}
0 commit comments