mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 02:03:11 +02:00
Distinguish not logged into metaverse vs domain
This commit is contained in:
parent
07504232a9
commit
2e9355da58
3 changed files with 16 additions and 10 deletions
|
@ -600,15 +600,15 @@ bool DomainGatekeeper::verifyUserSignature(const QString& username,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// we only send back a LoginError if this wasn't an "optimistic" key
|
// we only send back a LoginErrorMetaverse if this wasn't an "optimistic" key
|
||||||
// (a key that we hoped would work but is probably stale)
|
// (a key that we hoped would work but is probably stale)
|
||||||
|
|
||||||
if (!senderSockAddr.isNull() && !isOptimisticKey) {
|
if (!senderSockAddr.isNull() && !isOptimisticKey) {
|
||||||
qDebug() << "Error decrypting username signature for" << username << "- denying connection.";
|
qDebug() << "Error decrypting metaverse username signature for" << username << "- denying connection.";
|
||||||
sendConnectionDeniedPacket("Error decrypting username signature.", senderSockAddr,
|
sendConnectionDeniedPacket("Error decrypting username signature.", senderSockAddr,
|
||||||
DomainHandler::ConnectionRefusedReason::LoginError);
|
DomainHandler::ConnectionRefusedReason::LoginErrorMetaverse);
|
||||||
} else if (!senderSockAddr.isNull()) {
|
} else if (!senderSockAddr.isNull()) {
|
||||||
qDebug() << "Error decrypting username signature for" << username << "with optimisitic key -"
|
qDebug() << "Error decrypting metaverse username signature for" << username << "with optimistic key -"
|
||||||
<< "re-requesting public key and delaying connection";
|
<< "re-requesting public key and delaying connection";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,7 +622,7 @@ bool DomainGatekeeper::verifyUserSignature(const QString& username,
|
||||||
if (!senderSockAddr.isNull()) {
|
if (!senderSockAddr.isNull()) {
|
||||||
qDebug() << "Couldn't convert data to RSA key for" << username << "- denying connection.";
|
qDebug() << "Couldn't convert data to RSA key for" << username << "- denying connection.";
|
||||||
sendConnectionDeniedPacket("Couldn't convert data to RSA key.", senderSockAddr,
|
sendConnectionDeniedPacket("Couldn't convert data to RSA key.", senderSockAddr,
|
||||||
DomainHandler::ConnectionRefusedReason::LoginError);
|
DomainHandler::ConnectionRefusedReason::LoginErrorMetaverse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -492,7 +492,7 @@ void DomainHandler::processICEResponsePacket(QSharedPointer<ReceivedMessage> mes
|
||||||
|
|
||||||
bool DomainHandler::reasonSuggestsMetaverseLogin(ConnectionRefusedReason reasonCode) {
|
bool DomainHandler::reasonSuggestsMetaverseLogin(ConnectionRefusedReason reasonCode) {
|
||||||
switch (reasonCode) {
|
switch (reasonCode) {
|
||||||
case ConnectionRefusedReason::LoginError:
|
case ConnectionRefusedReason::LoginErrorMetaverse:
|
||||||
case ConnectionRefusedReason::NotAuthorizedMetaverse:
|
case ConnectionRefusedReason::NotAuthorizedMetaverse:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ bool DomainHandler::reasonSuggestsMetaverseLogin(ConnectionRefusedReason reasonC
|
||||||
|
|
||||||
bool DomainHandler::reasonSuggestsDomainLogin(ConnectionRefusedReason reasonCode) {
|
bool DomainHandler::reasonSuggestsDomainLogin(ConnectionRefusedReason reasonCode) {
|
||||||
switch (reasonCode) {
|
switch (reasonCode) {
|
||||||
case ConnectionRefusedReason::LoginError:
|
case ConnectionRefusedReason::LoginErrorDomain:
|
||||||
case ConnectionRefusedReason::NotAuthorizedDomain:
|
case ConnectionRefusedReason::NotAuthorizedDomain:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
|
@ -172,9 +172,9 @@ public:
|
||||||
* <td>The communications protocols of the domain and your Interface are not the same.</td>
|
* <td>The communications protocols of the domain and your Interface are not the same.</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td><strong>LoginError</strong></td>
|
* <td><strong>LoginErrorMetaverse</strong></td>
|
||||||
* <td><code>2</code></td>
|
* <td><code>2</code></td>
|
||||||
* <td>You could not be logged into the domain.</td>
|
* <td>You could not be logged into the domain per your metaverse login.</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
* <td><strong>NotAuthorizedMetaverse</strong></td>
|
* <td><strong>NotAuthorizedMetaverse</strong></td>
|
||||||
|
@ -192,6 +192,11 @@ public:
|
||||||
* <td>Connecting to the domain timed out.</td>
|
* <td>Connecting to the domain timed out.</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* <tr>
|
* <tr>
|
||||||
|
* <td><strong>LoginErrorDomain</strong></td>
|
||||||
|
* <td><code>2</code></td>
|
||||||
|
* <td>You could not be logged into the domain per your domain login.</td>
|
||||||
|
* </tr>
|
||||||
|
* <tr>
|
||||||
* <td><strong>NotAuthorizedDomain</strong></td>
|
* <td><strong>NotAuthorizedDomain</strong></td>
|
||||||
* <td><code>6</code></td>
|
* <td><code>6</code></td>
|
||||||
* <td>You are not authorized to connect to the domain per your domain login.</td>
|
* <td>You are not authorized to connect to the domain per your domain login.</td>
|
||||||
|
@ -203,10 +208,11 @@ public:
|
||||||
enum class ConnectionRefusedReason : uint8_t {
|
enum class ConnectionRefusedReason : uint8_t {
|
||||||
Unknown,
|
Unknown,
|
||||||
ProtocolMismatch,
|
ProtocolMismatch,
|
||||||
LoginError,
|
LoginErrorMetaverse,
|
||||||
NotAuthorizedMetaverse,
|
NotAuthorizedMetaverse,
|
||||||
TooManyUsers,
|
TooManyUsers,
|
||||||
TimedOut,
|
TimedOut,
|
||||||
|
LoginErrorDomain,
|
||||||
NotAuthorizedDomain
|
NotAuthorizedDomain
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue