Attempt to trace login POST failure
authorTheSaminator <TheSaminator@users.noreply.github.com>
Sun, 6 Feb 2022 21:48:36 +0000 (16:48 -0500)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Sun, 6 Feb 2022 21:48:36 +0000 (16:48 -0500)
src/jvmMain/kotlin/starshipfights/auth/providers.kt

index d4edc688b44652a89fe815f3534f2d7cc9dd59c5..861359597f17d513a39ada2eb363b2050b190d37 100644 (file)
@@ -25,6 +25,7 @@ import starshipfights.game.AdmiralRank
 import starshipfights.game.Faction
 import starshipfights.info.*
 import starshipfights.redirect
+import starshipfights.sfLogger
 
 interface AuthProvider {
        fun installAuth(conf: Authentication.Configuration)
@@ -194,8 +195,10 @@ object TestAuthProvider : AuthProvider {
                                        val originAddress = request.origin.remoteHost
                                        val userAgent = request.userAgent()
                                        if (userAgent != null && credentials.name.isValidUsername() && credentials.password == TEST_PASSWORD) {
+                                               sfLogger.info("Attempting to find user ${credentials.name}")
                                                val user = User.locate(User::username eq credentials.name)
                                                        ?: User(username = credentials.name).also { User.put(it) }
+                                               sfLogger.info("Got user ${user.id}")
                                                
                                                UserSession(
                                                        user = user.id,