@@ -110,27 +110,17 @@ class CLIAuthFlowTester {
110
110
// Log step-specific success information
111
111
switch ( stepName ) {
112
112
case 'metadata_discovery' :
113
- this . success ( 'METADATA DISCOVERY' , 'OAuth metadata discovered' , {
114
- issuer : this . state . oauthMetadata ?. issuer ,
115
- authorization_endpoint : this . state . oauthMetadata ?. authorization_endpoint ,
116
- token_endpoint : this . state . oauthMetadata ?. token_endpoint ,
117
- scopes_supported : this . state . oauthMetadata ?. scopes_supported ,
118
- resource_metadata : this . state . resourceMetadata ? {
119
- resource : this . state . resourceMetadata . resource ,
120
- authorization_servers : this . state . resourceMetadata . authorization_servers ,
121
- scopes_supported : this . state . resourceMetadata . scopes_supported ,
122
- } : null ,
123
- resource_metadata_error : this . state . resourceMetadataError ?. message ,
124
- } ) ;
113
+ if ( this . state . resourceMetadata ) {
114
+ this . success ( 'Resource Metadata' , 'OAuth Resource Metadata' , this . state . resourceMetadata ) ;
115
+ } else {
116
+ this . error ( 'Resource Metadata' , 'Issue fetching resource metadata' , this . state . resourceMetadataError ) ;
117
+ }
118
+
119
+ this . success ( 'METADATA DISCOVERY' , `OAuth metadata discovered, from: ${ this . state . authServerUrl } ` , this . state . oauthMetadata ) ;
125
120
break ;
126
121
127
122
case 'client_registration' :
128
- this . success ( 'CLIENT REGISTRATION' , 'Client registered successfully' , {
129
- client_id : this . state . oauthClientInfo ?. client_id ,
130
- client_secret : this . state . oauthClientInfo ?. client_secret ? '[REDACTED]' : undefined ,
131
- client_id_issued_at : this . state . oauthClientInfo ?. client_id_issued_at ,
132
- client_secret_expires_at : this . state . oauthClientInfo ?. client_secret_expires_at ,
133
- } ) ;
123
+ this . success ( 'CLIENT REGISTRATION' , 'Client registered successfully' , this . state . oauthClientInfo ) ;
134
124
break ;
135
125
136
126
case 'authorization_redirect' :
@@ -144,15 +134,9 @@ class CLIAuthFlowTester {
144
134
break ;
145
135
146
136
case 'token_request' :
147
- this . success ( 'TOKEN EXCHANGE' , 'Tokens obtained successfully' , {
148
- access_token : this . state . oauthTokens ?. access_token ? '[REDACTED]' : undefined ,
149
- token_type : this . state . oauthTokens ?. token_type ,
150
- expires_in : this . state . oauthTokens ?. expires_in ,
151
- refresh_token : this . state . oauthTokens ?. refresh_token ? '[REDACTED]' : undefined ,
152
- scope : this . state . oauthTokens ?. scope ,
153
- } ) ;
137
+ this . success ( 'TOKEN EXCHANGE' , 'Tokens obtained successfully' , this . state . oauthTokens ) ;
154
138
break ;
155
-
139
+
156
140
case 'validate_token' :
157
141
this . success ( 'TOKEN VALIDATION' , 'Token validated successfully' , {
158
142
message : this . state . statusMessage ?. message || 'Access token is valid' ,
@@ -289,7 +273,7 @@ class CLIAuthFlowTester {
289
273
// Step 6: Exchange Code for Tokens
290
274
await this . executeStep ( 'token_request' ) ;
291
275
console . log ( "" ) ;
292
-
276
+
293
277
// Step 7: Validate the token by calling tools/list
294
278
await this . executeStep ( 'validate_token' ) ;
295
279
console . log ( "" ) ;
0 commit comments