mirror of
https://github.com/esiur/esiur-js.git
synced 2026-04-03 21:48:21 +00:00
1.5.0
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
import IIPAuthPacketCommand from "./IIPAuthPacketCommand.js";
|
||||
import IIPAuthPacketAction from "./IIPAuthPacketAction.js";
|
||||
import IIPAuthPacketMethod from "./IIPAuthPacketMethod.js";
|
||||
import AuthenticationMethod from "../../Security/Authority/AuthenticationMethod.js";
|
||||
|
||||
export default class IIPAuthPacket
|
||||
{
|
||||
@@ -138,9 +138,9 @@ export default class IIPAuthPacket
|
||||
offset += domainLength;
|
||||
|
||||
|
||||
if (this.remoteMethod == IIPAuthPacketMethod.Credentials)
|
||||
if (this.remoteMethod == AuthenticationMethod.Credentials)
|
||||
{
|
||||
if (this.localMethod == IIPAuthPacketMethod.None)
|
||||
if (this.localMethod == AuthenticationMethod.None)
|
||||
{
|
||||
if (this.notEnough(offset, ends, 33))
|
||||
return -this.dataLengthNeeded;
|
||||
@@ -160,6 +160,21 @@ export default class IIPAuthPacket
|
||||
offset += length;
|
||||
}
|
||||
}
|
||||
else if (this.remoteMethod == AuthenticationMethod.Token)
|
||||
{
|
||||
if (this.localMethod == AuthenticationMethod.None)
|
||||
{
|
||||
if (this.notEnough(offset, ends, 40))
|
||||
return -this.dataLengthNeeded;
|
||||
|
||||
this.remoteNonce = data.clip(offset, 32);
|
||||
|
||||
offset += 32;
|
||||
|
||||
this.remoteTokenIndex = data.getUint64(offset);
|
||||
offset += 8;
|
||||
}
|
||||
}
|
||||
|
||||
if (encrypt)
|
||||
{
|
||||
@@ -188,9 +203,10 @@ export default class IIPAuthPacket
|
||||
return -this.dataLengthNeeded;
|
||||
|
||||
|
||||
if (this.remoteMethod == IIPAuthPacketMethod.Credentials)
|
||||
if (this.remoteMethod == AuthenticationMethod.Credentials
|
||||
|| this.remoteMethod == AuthenticationMethod.Token)
|
||||
{
|
||||
if (this.localMethod == IIPAuthPacketMethod.None)
|
||||
if (this.localMethod == AuthenticationMethod.None)
|
||||
{
|
||||
if (this.notEnough(offset, ends, 32))
|
||||
return -this.dataLengthNeeded;
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export default //const IIPAuthPacketMethod =
|
||||
{
|
||||
None: 0,
|
||||
Certificate: 1,
|
||||
Credentials: 2,
|
||||
Token: 3
|
||||
};
|
||||
Reference in New Issue
Block a user