@@ -134,7 +134,7 @@ paramikojs.AuthHandler.prototype = {
134
134
_parse_service_accept : function ( m ) {
135
135
var service = m . get_string ( ) ;
136
136
if ( service == 'ssh-userauth' ) {
137
- this . transport . _log ( DEBUG , 'userauth is OK' ) ;
137
+ console . debug ( 'userauth is OK' ) ;
138
138
var m = new paramikojs . Message ( ) ;
139
139
m . add_byte ( String . fromCharCode ( paramikojs . MSG_USERAUTH_REQUEST ) ) ;
140
140
m . add_string ( this . username ) ;
@@ -146,7 +146,7 @@ paramikojs.AuthHandler.prototype = {
146
146
try {
147
147
password = this . transport . toUTF8 . convertStringToUTF8 ( password , "UTF-8" , 1 ) ;
148
148
} catch ( ex ) {
149
- this . transport . _log ( DEBUG , ex ) ;
149
+ console . debug ( ex ) ;
150
150
}
151
151
m . add_string ( password ) ;
152
152
} else if ( this . auth_method == 'publickey' ) {
@@ -172,19 +172,19 @@ paramikojs.AuthHandler.prototype = {
172
172
}
173
173
this . transport . _send_message ( m ) ;
174
174
} else {
175
- this . transport . _log ( DEBUG , 'Service request "' + service + '" accepted (?)' ) ;
175
+ console . debug ( 'Service request "' + service + '" accepted (?)' ) ;
176
176
}
177
177
} ,
178
178
179
179
_send_auth_result : function ( username , method , result ) {
180
180
// okay, send result
181
181
var m = new paramikojs . Message ( ) ;
182
182
if ( result == paramikojs . AUTH_SUCCESSFUL ) {
183
- this . transport . _log ( INFO , 'Auth granted (' + method + ').' ) ;
183
+ console . info ( 'Auth granted (' + method + ').' ) ;
184
184
m . add_byte ( String . fromCharCode ( paramikojs . MSG_USERAUTH_SUCCESS ) ) ;
185
185
this . authenticated = true ;
186
186
} else {
187
- this . transport . _log ( INFO , 'Auth rejected (' + method + ').' ) ;
187
+ console . info ( 'Auth rejected (' + method + ').' ) ;
188
188
m . add_byte ( String . fromCharCode ( paramikojs . MSG_USERAUTH_FAILURE ) ) ;
189
189
m . add_string ( this . transport . server_object . get_allowed_auths ( username ) ) ;
190
190
if ( result == paramikojs . AUTH_PARTIALLY_SUCCESSFUL ) {
@@ -235,13 +235,13 @@ paramikojs.AuthHandler.prototype = {
235
235
var username = m . get_string ( ) ;
236
236
var service = m . get_string ( ) ;
237
237
var method = m . get_string ( ) ;
238
- this . transport . _log ( DEBUG , 'Auth request (type=' + method + ') service=' + service + ', username=' + username ) ;
238
+ console . debug ( 'Auth request (type=' + method + ') service=' + service + ', username=' + username ) ;
239
239
if ( service != 'ssh-connection' ) {
240
240
this . _disconnect_service_not_available ( ) ;
241
241
return ;
242
242
}
243
243
if ( this . auth_username && this . auth_username != username ) {
244
- this . transport . _log ( INFO , 'Auth rejected because the client attempted to change username in mid-flight' ) ;
244
+ console . info ( 'Auth rejected because the client attempted to change username in mid-flight' ) ;
245
245
this . _disconnect_no_more_auth ( ) ;
246
246
return ;
247
247
}
@@ -258,7 +258,7 @@ paramikojs.AuthHandler.prototype = {
258
258
if ( changereq ) {
259
259
// always treated as failure, since we don't support changing passwords, but collect
260
260
// the list of valid auth types from the callback anyway
261
- this . transport . _log ( DEBUG , 'Auth request to change passwords (rejected)' ) ;
261
+ console . debug ( 'Auth request to change passwords (rejected)' ) ;
262
262
var newpassword = m . get_string ( ) ;
263
263
newpassword = this . transport . fromUTF8 . ConvertFromUnicode ( newpassword ) + this . transport . fromUTF8 . Finish ( ) ;
264
264
result = paramikojs . AUTH_FAILED ;
@@ -272,7 +272,7 @@ paramikojs.AuthHandler.prototype = {
272
272
try {
273
273
key = this . transport . _key_info [ keytype ] ( new paramikojs . Message ( keyblob ) ) ;
274
274
} catch ( ex ) {
275
- this . transport . _log ( INFO , 'Auth rejected: public key: ' + ex . toString ( ) ) ;
275
+ console . info ( 'Auth rejected: public key: ' + ex . toString ( ) ) ;
276
276
key = null ;
277
277
}
278
278
if ( ! key ) {
@@ -296,7 +296,7 @@ paramikojs.AuthHandler.prototype = {
296
296
var sig = new paramikojs . Message ( m . get_string ( ) ) ;
297
297
var blob = this . _get_session_blob ( key , service , username ) ;
298
298
if ( ! key . verify_ssh_sig ( blob , sig ) ) {
299
- this . transport . _log ( INFO , 'Auth rejected: invalid signature' ) ;
299
+ console . info ( 'Auth rejected: invalid signature' ) ;
300
300
result = paramikojs . AUTH_FAILED ;
301
301
}
302
302
}
@@ -317,7 +317,7 @@ paramikojs.AuthHandler.prototype = {
317
317
} ,
318
318
319
319
_parse_userauth_success : function ( m ) {
320
- this . transport . _log ( INFO , 'Authentication (' + this . auth_method + ') successful!' ) ;
320
+ console . info ( 'Authentication (' + this . auth_method + ') successful!' ) ;
321
321
this . authenticated = true ;
322
322
this . transport . _auth_trigger ( ) ;
323
323
this . transport . auth_callback ( true ) ;
@@ -328,17 +328,17 @@ paramikojs.AuthHandler.prototype = {
328
328
var partial = m . get_boolean ( ) ;
329
329
var nextOptions = null ;
330
330
if ( partial ) {
331
- this . transport . _log ( INFO , 'Authentication continues...' ) ;
332
- this . transport . _log ( DEBUG , 'Methods: ' + authlist . toString ( ) ) ;
331
+ console . info ( 'Authentication continues...' ) ;
332
+ console . debug ( 'Methods: ' + authlist . toString ( ) ) ;
333
333
//this.transport.saved_exception = new paramikojs.ssh_exception.PartialAuthentication(authlist);
334
334
nextOptions = authlist ;
335
335
} else if ( authlist . indexOf ( this . auth_method ) == - 1 ) {
336
- this . transport . _log ( DEBUG , 'Authentication type (' + this . auth_method + ') not permitted.' ) ;
337
- this . transport . _log ( DEBUG , 'Allowed methods: ' + authlist . toString ( ) ) ;
336
+ console . debug ( 'Authentication type (' + this . auth_method + ') not permitted.' ) ;
337
+ console . debug ( 'Allowed methods: ' + authlist . toString ( ) ) ;
338
338
//this.transport.saved_exception = new paramikojs.ssh_exception.BadAuthenticationType('Bad authentication type', authlist);
339
339
nextOptions = authlist ;
340
340
} else {
341
- this . transport . _log ( INFO , 'Authentication (' + this . auth_method + ') failed.' ) ;
341
+ console . info ( 'Authentication (' + this . auth_method + ') failed.' ) ;
342
342
}
343
343
this . authenticated = false ;
344
344
this . username = null ;
@@ -348,7 +348,7 @@ paramikojs.AuthHandler.prototype = {
348
348
_parse_userauth_banner : function ( m ) {
349
349
var banner = m . get_string ( ) ;
350
350
var lang = m . get_string ( ) ;
351
- this . transport . _log ( INFO , 'Auth banner: ' + banner ) ;
351
+ console . info ( 'Auth banner: ' + banner ) ;
352
352
// who cares.
353
353
} ,
354
354
0 commit comments