forked from mysqljs/mysql
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '1044a14745b97a43a5887d3c586b1d3a022d5154'
Incorporated nwoltman's PR#2233 that adds support for authentication using the caching_sha2_password plugin which is the default in MySQL 8 mysqljs#2233
- Loading branch information
Showing
34 changed files
with
1,057 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = AuthMoreDataPacket; | ||
function AuthMoreDataPacket(options) { | ||
options = options || {}; | ||
|
||
this.status = 0x01; | ||
this.data = options.data; | ||
} | ||
|
||
AuthMoreDataPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.data = parser.parsePacketTerminatedString(); | ||
}; | ||
|
||
AuthMoreDataPacket.prototype.write = function parse(writer) { | ||
writer.writeUnsignedNumber(this.status); | ||
writer.writeString(this.data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = ClearTextPasswordPacket; | ||
function ClearTextPasswordPacket(options) { | ||
this.data = options.data; | ||
} | ||
|
||
ClearTextPasswordPacket.prototype.write = function write(writer) { | ||
writer.writeNullTerminatedString(this.data); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = FastAuthSuccessPacket; | ||
function FastAuthSuccessPacket() { | ||
this.status = 0x01; | ||
this.authMethodName = 0x03; | ||
} | ||
|
||
FastAuthSuccessPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.authMethodName = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
FastAuthSuccessPacket.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
writer.writeUnsignedNumber(1, this.authMethodName); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = HandshakeResponse41Packet; | ||
function HandshakeResponse41Packet() { | ||
this.status = 0x02; | ||
} | ||
|
||
HandshakeResponse41Packet.prototype.parse = function write(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
HandshakeResponse41Packet.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = PerformFullAuthenticationPacket; | ||
function PerformFullAuthenticationPacket() { | ||
this.status = 0x01; | ||
this.authMethodName = 0x04; | ||
} | ||
|
||
PerformFullAuthenticationPacket.prototype.parse = function parse(parser) { | ||
this.status = parser.parseUnsignedNumber(1); | ||
this.authMethodName = parser.parseUnsignedNumber(1); | ||
}; | ||
|
||
PerformFullAuthenticationPacket.prototype.write = function write(writer) { | ||
writer.writeUnsignedNumber(1, this.status); | ||
writer.writeUnsignedNumber(1, this.authMethodName); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.