Skip to content

Commit 144c186

Browse files
committed
Capture error thrown in OAUTH for Token Authentication
1 parent 9cd3f8d commit 144c186

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

doc/src/release_notes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Common Changes
2828
Thin Mode Changes
2929
+++++++++++++++++
3030

31+
#) Fixed issue that does not throw Authentication error for FastAuth
32+
when invalid token is used with external authentication.
33+
3134
#) Added connection optimization feature which uses Server Name Indication (SNI)
3235
extension of the TLS protocol.
3336

lib/thin/protocol/messages/fastAuth.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
1+
// Copyright (c) 2023, 2025, Oracle and/or its affiliates.
22

33
//-----------------------------------------------------------------------------
44
//
@@ -70,6 +70,11 @@ class FastAuthMessage extends Message {
7070
} else {
7171
this.authMessage.processMessage(buf, messageType);
7272
this.endOfResponse = this.authMessage.endOfResponse;
73+
if (this.authMessage.errorOccurred) {
74+
// Capture the Error returned in TNS_MSG_TYPE_ERROR processing.
75+
this.errorOccurred = this.authMessage.errorOccurred;
76+
this.errorInfo = this.authMessage.errorInfo;
77+
}
7378
}
7479
}
7580

0 commit comments

Comments
 (0)