mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +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;
|
||||
|
||||
} 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)
|
||||
|
||||
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,
|
||||
DomainHandler::ConnectionRefusedReason::LoginError);
|
||||
DomainHandler::ConnectionRefusedReason::LoginErrorMetaverse);
|
||||
} 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";
|
||||
}
|
||||
|
||||
|
@ -622,7 +622,7 @@ bool DomainGatekeeper::verifyUserSignature(const QString& username,
|
|||
if (!senderSockAddr.isNull()) {
|
||||
qDebug() << "Couldn't convert data to RSA key for" << username << "- denying connection.";
|
||||
sendConnectionDeniedPacket("Couldn't convert data to RSA key.", senderSockAddr,
|
||||
DomainHandler::ConnectionRefusedReason::LoginError);
|
||||
DomainHandler::ConnectionRefusedReason::LoginErrorMetaverse);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -492,7 +492,7 @@ void DomainHandler::processICEResponsePacket(QSharedPointer<ReceivedMessage> mes
|
|||
|
||||
bool DomainHandler::reasonSuggestsMetaverseLogin(ConnectionRefusedReason reasonCode) {
|
||||
switch (reasonCode) {
|
||||
case ConnectionRefusedReason::LoginError:
|
||||
case ConnectionRefusedReason::LoginErrorMetaverse:
|
||||
case ConnectionRefusedReason::NotAuthorizedMetaverse:
|
||||
return true;
|
||||
|
||||
|
@ -507,7 +507,7 @@ bool DomainHandler::reasonSuggestsMetaverseLogin(ConnectionRefusedReason reasonC
|
|||
|
||||
bool DomainHandler::reasonSuggestsDomainLogin(ConnectionRefusedReason reasonCode) {
|
||||
switch (reasonCode) {
|
||||
case ConnectionRefusedReason::LoginError:
|
||||
case ConnectionRefusedReason::LoginErrorDomain:
|
||||
case ConnectionRefusedReason::NotAuthorizedDomain:
|
||||
return true;
|
||||
|
||||
|
|
|
@ -172,9 +172,9 @@ public:
|
|||
* <td>The communications protocols of the domain and your Interface are not the same.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <td><strong>LoginError</strong></td>
|
||||
* <td><strong>LoginErrorMetaverse</strong></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>
|
||||
* <td><strong>NotAuthorizedMetaverse</strong></td>
|
||||
|
@ -192,6 +192,11 @@ public:
|
|||
* <td>Connecting to the domain timed out.</td>
|
||||
* </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><code>6</code></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 {
|
||||
Unknown,
|
||||
ProtocolMismatch,
|
||||
LoginError,
|
||||
LoginErrorMetaverse,
|
||||
NotAuthorizedMetaverse,
|
||||
TooManyUsers,
|
||||
TimedOut,
|
||||
LoginErrorDomain,
|
||||
NotAuthorizedDomain
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue