diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4f119c21..37648ad8bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New attack animation - weapon control system - Game pauses when in singleplayer and pause menu +- Added authentication system (to play on the official server register on https://account.veloren.net) ### Changed diff --git a/Cargo.lock b/Cargo.lock index 083ae3808f..81d5bdc3d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,6 +134,30 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "auth-common" +version = "0.1.0" +source = "git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97#65571ade0d954a0e0bd995fdb314854ff146ab97" +dependencies = [ + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "authc" +version = "1.0.0" +source = "git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97#65571ade0d954a0e0bd995fdb314854ff146ab97" +dependencies = [ + "auth-common 0.1.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rust-argon2 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "autocfg" version = "0.1.7" @@ -181,6 +205,11 @@ dependencies = [ "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "base64" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "bincode" version = "1.2.0" @@ -272,6 +301,11 @@ dependencies = [ "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bumpalo" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "byteorder" version = "0.5.3" @@ -282,6 +316,11 @@ name = "byteorder" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "bytes" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "c2-chacha" version = "0.2.3" @@ -462,9 +501,9 @@ dependencies = [ [[package]] name = "conrod_core" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git#d28fd18c3092d4c26cf6df11673da195b3bc01db" +source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" dependencies = [ - "conrod_derive 0.63.0 (git+https://gitlab.com/veloren/conrod.git)", + "conrod_derive 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)", "copypasta 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "daggy 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -477,7 +516,7 @@ dependencies = [ [[package]] name = "conrod_derive" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git#d28fd18c3092d4c26cf6df11673da195b3bc01db" +source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" dependencies = [ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -487,7 +526,7 @@ dependencies = [ [[package]] name = "conrod_winit" version = "0.63.0" -source = "git+https://gitlab.com/veloren/conrod.git#d28fd18c3092d4c26cf6df11673da195b3bc01db" +source = "git+https://gitlab.com/veloren/conrod.git?branch=hide_text#92925b122dfed139169c7d7687b3ca15c0cb5a2e" [[package]] name = "const-random" @@ -535,11 +574,25 @@ dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "core-foundation" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "core-foundation-sys" version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "core-foundation-sys" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "core-graphics" version = "0.17.3" @@ -744,6 +797,14 @@ dependencies = [ "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ct-logs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "daggy" version = "0.5.0" @@ -844,11 +905,24 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dtoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "either" version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "encoding_rs" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "env_logger" version = "0.6.2" @@ -993,6 +1067,69 @@ name = "fuchsia-zircon-sys" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "gdk" version = "0.8.0" @@ -1361,6 +1498,24 @@ dependencies = [ "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "h2" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hashbrown" version = "0.6.3" @@ -1380,6 +1535,11 @@ dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hex" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "hibitset" version = "0.6.2" @@ -1394,6 +1554,25 @@ name = "hound" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "http" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "http-body" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "httparse" version = "1.3.4" @@ -1407,6 +1586,46 @@ dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "hyper" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-rustls" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "idna" version = "0.1.5" @@ -1520,6 +1739,14 @@ dependencies = [ "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "js-sys" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -1707,6 +1934,11 @@ dependencies = [ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "mime_guess" version = "1.8.7" @@ -1718,14 +1950,24 @@ dependencies = [ "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mime_guess" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "minifb" -version = "0.13.0" -source = "git+https://github.com/emoon/rust_minifb.git#bac71b297920c1f7ab5d6e384673d3ae5cc7d46d" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", "orbclient 0.3.27 (registry+https://github.com/rust-lang/crates.io-index)", + "raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "x11-dl 2.18.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2194,6 +2436,34 @@ dependencies = [ "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pin-project" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "piston-float" version = "0.3.0" @@ -2267,6 +2537,11 @@ dependencies = [ "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-nested" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro2" version = "0.3.8" @@ -2534,7 +2809,7 @@ dependencies = [ [[package]] name = "raw-window-handle" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2618,6 +2893,55 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "reqwest" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-rustls 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-futures 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "ring" +version = "0.16.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rodio" version = "0.10.0" @@ -2678,6 +3002,17 @@ dependencies = [ "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rust-argon2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "blake2b_simd 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", + "constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rustc-demangle" version = "0.1.16" @@ -2699,6 +3034,29 @@ dependencies = [ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rustls" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "rustls-native-certs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "rusttype" version = "0.7.9" @@ -2749,6 +3107,15 @@ dependencies = [ "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "schannel" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "scoped_threadpool" version = "0.1.9" @@ -2759,6 +3126,15 @@ name = "scopeguard" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "sct" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sdl2" version = "0.32.2" @@ -2781,6 +3157,26 @@ dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "security-framework" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "security-framework-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "semver" version = "0.9.0" @@ -2822,6 +3218,17 @@ dependencies = [ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "serde_urlencoded" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha1" version = "0.6.0" @@ -3129,6 +3536,46 @@ dependencies = [ "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-rustls" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-util" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "toml" version = "0.5.5" @@ -3137,6 +3584,11 @@ dependencies = [ "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tower-service" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "treeculler" version = "0.1.0" @@ -3145,6 +3597,11 @@ dependencies = [ "num-traits 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "try-lock" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "tuple_utils" version = "0.3.0" @@ -3166,6 +3623,14 @@ dependencies = [ "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicase" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -3197,6 +3662,11 @@ name = "unicode-xid" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "untrusted" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "url" version = "1.7.2" @@ -3217,6 +3687,15 @@ dependencies = [ "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "uuid" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "uvth" version = "3.1.1" @@ -3259,6 +3738,7 @@ dependencies = [ name = "veloren-client" version = "0.5.0" dependencies = [ + "authc 1.0.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)", "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3274,6 +3754,7 @@ dependencies = [ name = "veloren-common" version = "0.5.0" dependencies = [ + "authc 1.0.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)", "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3305,6 +3786,7 @@ dependencies = [ name = "veloren-server" version = "0.5.0" dependencies = [ + "authc 1.0.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3341,11 +3823,12 @@ dependencies = [ name = "veloren-voxygen" version = "0.5.0" dependencies = [ + "authc 1.0.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)", "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "conrod_core 0.63.0 (git+https://gitlab.com/veloren/conrod.git)", - "conrod_winit 0.63.0 (git+https://gitlab.com/veloren/conrod.git)", + "conrod_core 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)", + "conrod_winit 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)", "cpal 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3371,7 +3854,6 @@ dependencies = [ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "rodio 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "specs 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3399,7 +3881,7 @@ dependencies = [ "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "minifb 0.13.0 (git+https://github.com/emoon/rust_minifb.git)", + "minifb 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", "noise 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "ordered-float 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3421,6 +3903,11 @@ name = "version_check" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "void" version = "1.0.2" @@ -3436,11 +3923,82 @@ dependencies = [ "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "wasi" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "wasm-bindgen" +version = "0.2.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-macro-support 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-backend 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.59" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "wayland-client" version = "0.21.13" @@ -3548,6 +4106,32 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "web-sys" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)", + "wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "webpki" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)", + "untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "webpki-roots" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi" version = "0.2.8" @@ -3611,7 +4195,7 @@ dependencies = [ "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "raw-window-handle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", "smithay-client-toolkit 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3619,6 +4203,14 @@ dependencies = [ "x11-dl 2.18.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "winreg" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winres" version = "0.1.11" @@ -3693,11 +4285,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum atk-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8dc233521f7bffd3042c31082ea71bd08820abf44bac938fb36591e20f76f39" "checksum atom 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3c86699c3f02778ec07158376991c8f783dd1f2f95c579ffaf0738dc984b2fe2" "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" +"checksum auth-common 0.1.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)" = "" +"checksum authc 1.0.0 (git+https://gitlab.com/veloren/auth.git?rev=65571ade0d954a0e0bd995fdb314854ff146ab97)" = "" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" +"checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8ab639324e3ee8774d296864fbc0dbbb256cf1a41c490b94cba90c082915f92" "checksum bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebd71393f1ec0509b553aa012b9b58e81dadbdff7130bd3b8cba576e69b32f75" @@ -3709,8 +4304,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" "checksum bstr 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6c2c5b58ab920a4f5aeaaca34b4488074e8cc7596af94e6f8c6ff247c60245" "checksum buf_redux 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b953a6887648bb07a535631f2bc00fbdb2a2216f135552cb3f534ed136b9c07f" +"checksum bumpalo 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f359dc14ff8911330a51ef78022d376f25ed00248912803b58f00cb1c27f742" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" "checksum c_vec 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f8a318911dce53b5f1ca6539c44f5342c632269f0fa7ea3e35f32458c27a7c30" "checksum cairo-rs 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a110f269c2fd382df5fe8bd46dfa5f1b83608aa717fecb6e7a28c08c202f0e13" @@ -3731,15 +4328,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum cocoa 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f29f7768b2d1be17b96158e3285951d366b40211320fb30826a76cb7a0da6400" "checksum color_quant 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0dbbb57365263e881e805dc77d94697c9118fd94d8da011240555aa7b23445bd" "checksum colored 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "433e7ac7d511768127ed85b0c4947f47a254131e37864b2dc13f52aa32cd37e5" -"checksum conrod_core 0.63.0 (git+https://gitlab.com/veloren/conrod.git)" = "" -"checksum conrod_derive 0.63.0 (git+https://gitlab.com/veloren/conrod.git)" = "" -"checksum conrod_winit 0.63.0 (git+https://gitlab.com/veloren/conrod.git)" = "" +"checksum conrod_core 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)" = "" +"checksum conrod_derive 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)" = "" +"checksum conrod_winit 0.63.0 (git+https://gitlab.com/veloren/conrod.git?branch=hide_text)" = "" "checksum const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" "checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum copypasta 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe78fc904c59791fc39ba6ed427d45c1cd81529f5496552c3e10dab17b37409" "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" +"checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" +"checksum core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" "checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" "checksum coreaudio-rs 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f229761965dad3e9b11081668a6ea00f1def7aa46062321b5ec245b834f6e491" "checksum coreaudio-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e8f5954c1c7ccb55340443e8b29fca24013545a5e7d72c1ca7db4fc02b982ce" @@ -3759,6 +4358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" "checksum csv 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37519ccdfd73a75821cac9319d4fce15a81b9fcf75f951df5b9988aa3a0af87d" "checksum csv-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9b5cadb6b25c77aeff80ba701712494213f4a8418fcda2ee11b6560c3ad0bf4c" +"checksum ct-logs 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4d3686f5fa27dbc1d76c751300376e167c5a43387f44bb451fd1c24776e49113" "checksum daggy 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9293a0da7d1bc1f30090ece4d9f9de79a07be7302ddb00e5eb1fefb6ee6409e2" "checksum deflate 0.7.20 (registry+https://github.com/rust-lang/crates.io-index)" = "707b6a7b384888a70c8d2e8650b3e60170dfc6a67bb4aa67b6dfca57af4bedb4" "checksum derivative 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "942ca430eef7a3806595a6737bc388bf51adb888d3fc0dd1b50f1c170167ee3a" @@ -3771,7 +4371,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum dot_vox 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "11afd3251e588f2770226659b2a1d55ec2f8aaf2ca42bdcdbd01ff53b4a81e70" "checksum downcast-rs 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" "checksum draw_state 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "33cf9537e2d06891448799b96d5a8c8083e0e90522a7fdabe6ebf4f41d79d651" +"checksum dtoa 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" +"checksum encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum euc 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c20f6684a8420df7c300a36bed7cb0b2387b2bc385d4940282399b5df0c08ebd" "checksum euclid 0.19.9 (registry+https://github.com/rust-lang/crates.io-index)" = "596b99621b9477e7a5f94d2d8dd13a9c5c302ac358b822c67a42b6f1054450e1" @@ -3790,6 +4392,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" +"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" +"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum gdk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd30051ff3d908ff2fc7e5776ffe1c699821e043809f294c3a61004f11d6c3a9" "checksum gdk-pixbuf 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c2d2199eba47ebcb9977ce28179649bdd59305ef465c4e6f9b65aaa41c24e6b5" "checksum gdk-pixbuf-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df6a3b73e04fafc07f5ebc083f1096a773412e627828e1103a55e921f81187d8" @@ -3822,12 +4432,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum gtk-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d9554cf5b3a85a13fb39258c65b04b262989c1d7a758f8f555b77a478621a91" "checksum guillotiere 0.4.2 (git+https://github.com/Imberflur/guillotiere)" = "" "checksum gzip-header 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0131feb3d3bb2a5a238d8a4d09f6353b7ebfdc52e77bccbf4ea6eaa751dde639" +"checksum h2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9d5c295d1c0c68e4e42003d75f908f5e16a1edd1cbe0b0d02e4dc2006a384f47" "checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" +"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" "checksum hibitset 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "47e7292fd9f7fe89fa35c98048f2d0a69b79ed243604234d18f6f8a1aa6f408d" "checksum hound 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" +"checksum http-body 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" +"checksum hyper 0.13.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b15203263d1faa615f9337d79c1d37959439dc46c2b4faab33286fadc2a1c5" +"checksum hyper-rustls 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac965ea399ec3a25ac7d13b8affd4b8f39325cca00858ddf5eb29b79e6b14b08" "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" "checksum image 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4be8aaefbe7545dc42ae925afb55a0098f226a3fe5ef721872806f44f57826" @@ -3841,6 +4457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" "checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" "checksum jpeg-decoder 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "c1aae18ffeeae409c6622c3b6a7ee49792a7e5a062eea1b135fbb74e301792ba" +"checksum js-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)" = "1cb931d43e71f560c81badb0191596562bafad2be06a3f9025b845c847c60df5" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum khronos_api 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" @@ -3865,8 +4482,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime_guess 1.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0d977de9ee851a0b16e932979515c0f3da82403183879811bc97d50bd9cc50f7" -"checksum minifb 0.13.0 (git+https://github.com/emoon/rust_minifb.git)" = "" +"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +"checksum minifb 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "799c20458eb0dd69f48cea5014afe736b363818c86d7ca61dbb56e1c0585014c" "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" @@ -3915,6 +4534,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +"checksum pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum piston-float 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b058c3a640efd4bcf63266512e4bb03187192c1b29edd38b16d5a014613e3199" "checksum piston-viewport 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d96dd995f7dabe6d57cda668ec0fda39d6fe6e1e0b23f772582f383f2013611" "checksum pistoncore-input 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c612ce242c7bac8e96426a0ca34275fd980af440f0cca7c6c0e840ef8a4052f" @@ -3924,6 +4547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "717ee476b1690853d222af4634056d830b5197ffd747726a9a1eee6da9f49074" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" @@ -3953,7 +4577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rand_xoshiro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0e18c91676f670f6f0312764c759405f13afb98d5d73819840cf72a518487bff" -"checksum raw-window-handle 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9db80d08d3ed847ce4fb3def46de0af4bfb6155bd09bd6eaf28b5ac72541c1f1" +"checksum raw-window-handle 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a441a7a6c80ad6473bd4b74ec1c9a4c951794285bf941c2126f607c72e48211" "checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" "checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" @@ -3963,29 +4587,39 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum regex-automata 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "92b73c2a1770c255c240eaa4ee600df1704a38dc3feaa6e949e7fcd4f8dc09f9" "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +"checksum reqwest 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)" = "02b81e49ddec5109a9dcfc5f2a317ff53377c915e9ae9d4f2fb50914b85614e2" +"checksum ring 0.16.11 (registry+https://github.com/rust-lang/crates.io-index)" = "741ba1704ae21999c00942f9f5944f801e977f54302af346b596287599ad1862" "checksum rodio 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0e0dfa7c8b17c6428f6e992a22ea595922cc86f946191b6b59e7ce96b77262" "checksum ron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2ece421e0c4129b90e4a35b6f625e472e96c552136f5093a2f4fa2bbb75a62d5" "checksum roots 0.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e4c67c712ab62be58b24ab8960e2b95dd4ee00aac115c76f2709657821fe376d" "checksum rouille 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "112568052ec17fa26c6c11c40acbb30d3ad244bf3d6da0be181f5e7e42e5004f" "checksum rust-argon2 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4ca4eaef519b494d1f2848fc602d18816fed808a981aedf4f1f00ceb7c9d32cf" +"checksum rust-argon2 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "416f5109bdd413cec4f04c029297838e7604c993f8d1483b1d438f23bdc3eb35" "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +"checksum rustls 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d4a31f5d68413404705d6982529b0e11a9aacd4839d1d6222ee3b8cb4015e1" +"checksum rustls-native-certs 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a75ffeb84a6bd9d014713119542ce415db3a3e4748f0bfce1e1416cd224a23a5" "checksum rusttype 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "310942406a39981bed7e12b09182a221a29e0990f3e7e0c971f131922ed135d5" "checksum rusttype 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "14a911032fb5791ccbeec9f28fdcb9bf0983b81f227bafdfd227c658d0731c8a" "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" "checksum same-file 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585e8ddcedc187886a30fa705c47985c3fa88d06624095856b36ca0b82ff4421" "checksum scan_fmt 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "faf737f37ca340201889b5f48ecde47f233e9da3cbf3d04be27883adac39b4da" +"checksum schannel 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" "checksum scoped_threadpool 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1d51f5df5af43ab3f1360b429fa5e0152ac5ce8c0bd6485cae490332e96846a8" "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" +"checksum sct 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" "checksum sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d051a07231e303f5f719da78cb6f7394f6d5b54f733aef5b0b447804a83edd7b" "checksum sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)" = "34e71125077d297d57e4c1acfe8981b5bdfbf5a20e7b589abfdcb33bf1127f86" +"checksum security-framework 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "97bbedbe81904398b6ebb054b3e912f99d55807125790f3198ac990d98def5b0" +"checksum security-framework-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "06fd2f23e31ef68dd2328cc383bd493142e46107a3a0e24f7d734e3f3b80fe4c" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" "checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8" "checksum serde_json 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "1a3351dcbc1f067e2c92ab7c3c1f288ad1a4cffc470b5aaddb4c2e0a3ae80043" +"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" @@ -4022,25 +4656,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" "checksum tiny_http 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1661fa0a44c95d01604bd05c66732a446c657efb62b5164a7a083a3b552b4951" "checksum tinytemplate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4574b75faccaacddb9b284faecdf0b544b80b6b294f3d062d325c5726a209c20" +"checksum tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "0fa5e81d6bc4e67fe889d5783bd2a128ab2e0cfa487e0be16b6a8d177b101616" +"checksum tokio-rustls 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4adb8b3e5f86b707f1b54e7c15b6de52617a823608ccda98a15d3a24222f265a" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" "checksum toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf" +"checksum tower-service 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" "checksum treeculler 0.1.0 (git+https://gitlab.com/yusdacra/treeculler.git)" = "" +"checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum tuple_utils 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44834418e2c5b16f47bedf35c28e148db099187dd5feee6367fb2525863af4f1" "checksum twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" "checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +"checksum untrusted 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60369ef7a31de49bcb3f6ca728d4ba7300d9a1658f94c727d4cab8c8d9f4aece" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" "checksum uvth 3.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e59a167890d173eb0fcd7a1b99b84dc05c521ae8d76599130b8e19bef287abbf" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum vek 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)" = "1eb3ca8ea588deba055424cc1a79a830428b2f6c270b8d8f91946f660fa4d8ee" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" +"checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum walkdir 2.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9658c94fa8b940eab2250bd5a457f9c48b748420d71293b165c8cdbe2f55f71e" +"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" +"checksum wasm-bindgen 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "3557c397ab5a8e347d434782bcd31fc1483d927a6826804cec05cc792ee2519d" +"checksum wasm-bindgen-backend 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "e0da9c9a19850d3af6df1cb9574970b566d617ecfaf36eb0b706b6f3ef9bd2f8" +"checksum wasm-bindgen-futures 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "457414a91863c0ec00090dba537f88ab955d93ca6555862c29b6d860990b8a8a" +"checksum wasm-bindgen-macro 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "0f6fde1d36e75a714b5fe0cffbb78978f222ea6baebb726af13c78869fdb4205" +"checksum wasm-bindgen-macro-support 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "25bda4168030a6412ea8a047e27238cadf56f0e53516e1e83fec0a8b7c786f6d" +"checksum wasm-bindgen-shared 0.2.59 (registry+https://github.com/rust-lang/crates.io-index)" = "fc9f36ad51f25b0219a3d4d13b90eb44cd075dff8b6280cca015775d7acaddd8" "checksum wayland-client 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "49963e5f9eeaf637bfcd1b9f0701c99fd5cd05225eb51035550d4272806f2713" "checksum wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" "checksum wayland-commons 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "40c08896768b667e1df195d88a62a53a2d1351a1ed96188be79c196b35bb32ec" @@ -4051,6 +4701,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum wayland-scanner 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93b02247366f395b9258054f964fe293ddd019c3237afba9be2ccbe9e1651c3d" "checksum wayland-sys 0.21.13 (registry+https://github.com/rust-lang/crates.io-index)" = "520ab0fd578017a0ee2206623ba9ef4afe5e8f23ca7b42f6acfba2f4e66b1628" "checksum wayland-sys 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d94e89a86e6d6d7c7c9b19ebf48a03afaac4af6bc22ae570e9a24124b75358f4" +"checksum web-sys 0.3.36 (registry+https://github.com/rust-lang/crates.io-index)" = "721c6263e2c66fd44501cc5efbfa2b7dfa775d13e4ea38c46299646ed1f9c70a" +"checksum webpki 0.21.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1f50e1972865d6b1adb54167d1c8ed48606004c2c9d0ea5f1eeb34d95e863ef" +"checksum webpki-roots 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "91cd5736df7f12a964a5067a12c62fa38e1bd8080aff1f80bc29be7c80d19ab4" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" @@ -4059,6 +4712,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" "checksum winit 0.19.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1e96eb4bb472fa43e718e8fa4aef82f86cd9deac9483a1e1529230babdb394a8" +"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" "checksum winres 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ff4fb510bbfe5b8992ff15f77a2e6fe6cf062878f0eda00c0f44963a807ca5dc" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" "checksum x11-clipboard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "89bd49c06c9eb5d98e6ba6536cf64ac9f7ee3a009b2f53996d405b3944f6bcea" diff --git a/README.md b/README.md index 4ffbf053c8..60d017207d 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ Currently the communication of contributors happens mainly on our [official Disc ## Useful Links +[Sign Up](https://account.veloren.net) - Here you can create an online account for Veloren. +This will be needed to play on auth-enabled servers, including the official server. + [The Book](https://book.veloren.net) - A collection of all important information relating to Veloren. It includes information on how to compile Veloren and how to contribute. [Future Plans](https://gitlab.com/veloren/veloren/milestones) - Go here for information about Veloren's development roadmap and what we're currently working on. diff --git a/assets/voxygen/i18n/en.ron b/assets/voxygen/i18n/en.ron index 96d7344654..a9ab34bd68 100644 --- a/assets/voxygen/i18n/en.ron +++ b/assets/voxygen/i18n/en.ron @@ -65,6 +65,8 @@ VoxygenLocalization( "common.disclaimer": "Disclaimer", "common.cancel": "Cancel", "common.none": "None", + "common.error": "Error", + "common.fatal_error": "Fatal Error", // Message when connection to the server is lost "common.connection_lost": r#"Connection lost! @@ -113,12 +115,25 @@ Thanks for taking the time to read this notice, we hope you enjoy the game! // Login process description "main.login_process": r#"Information on the Login Process: -Put in any username. No Account needed yet. - -Character names and appearances will be saved locally. +If you are having issues signing in: -Levels/Items are not saved yet."#, +Please note that you now need an account +to play on auth-enabled servers. +You can create an account over at + +https://account.veloren.net."#, + "main.login.server_not_found": "Server not found", + "main.login.authentication_error": "Auth error on server", + "main.login.server_full": "Server is full", + "main.login.untrusted_auth_server": "Auth server not trusted", + "main.login.outdated_client_or_server": "ServerWentMad: Probably versions are incompatible, check for updates.", + "main.login.timeout": "Timeout: Server did not respond in time. (Overloaded or network issues).", + "main.login.server_shut_down": "Server shut down", + "main.login.already_logged_in": "You are already logged into the server.", + "main.login.network_error": "Network error", + "main.login.failed_sending_request": "Request to Auth server failed", + "main.login.client_crashed": "Client crashed", /// End Main screen section @@ -358,4 +373,4 @@ Willpower "esc_menu.quit_game": "Quit Game", /// End Escape Menu Section } -) \ No newline at end of file +) diff --git a/chat-cli/src/main.rs b/chat-cli/src/main.rs index b74c1ea87f..312094231c 100644 --- a/chat-cli/src/main.rs +++ b/chat-cli/src/main.rs @@ -51,7 +51,9 @@ fn main() { println!("Players online: {:?}", client.get_players()); client - .register(comp::Player::new(username, None), password) + .register(username, password, |provider| { + provider == "https://auth.veloren.net" + }) .unwrap(); let (tx, rx) = mpsc::channel(); diff --git a/client/Cargo.toml b/client/Cargo.toml index a67b2db65d..9d649f0b01 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -15,3 +15,4 @@ log = "0.4.8" specs = "0.15.1" vek = { version = "0.9.9", features = ["serde"] } hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] } +authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" } diff --git a/client/src/error.rs b/client/src/error.rs index 154387e16c..b81e806286 100644 --- a/client/src/error.rs +++ b/client/src/error.rs @@ -1,3 +1,4 @@ +use authc::AuthClientError; use common::net::PostError; #[derive(Debug)] @@ -7,11 +8,18 @@ pub enum Error { ServerTimeout, ServerShutdown, TooManyPlayers, - InvalidAuth, + AlreadyLoggedIn, + AuthErr(String), + AuthClientError(AuthClientError), + AuthServerNotTrusted, //TODO: InvalidAlias, Other(String), } impl From for Error { - fn from(err: PostError) -> Self { Error::Network(err) } + fn from(err: PostError) -> Self { Self::Network(err) } +} + +impl From for Error { + fn from(err: AuthClientError) -> Self { Self::AuthClientError(err) } } diff --git a/client/src/lib.rs b/client/src/lib.rs index 5bb2068dc6..09841e3fa7 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -5,6 +5,7 @@ pub mod error; // Reexports pub use crate::error::Error; +pub use authc::AuthClientError; pub use specs::{ join::Join, saveload::{Marker, MarkerAllocator}, @@ -17,7 +18,7 @@ use common::{ event::{EventBus, SfxEvent, SfxEventItem}, msg::{ validate_chat_msg, ChatMsgValidationError, ClientMsg, ClientState, PlayerListUpdate, - RequestStateError, ServerError, ServerInfo, ServerMsg, MAX_BYTES_CHAT_MSG, + RegisterError, RequestStateError, ServerInfo, ServerMsg, MAX_BYTES_CHAT_MSG, }, net::PostBox, state::State, @@ -86,13 +87,13 @@ impl Client { let mut postbox = PostBox::to(addr)?; // Wait for initial sync - let (state, entity, server_info, world_map) = match postbox.next_message() { - Some(ServerMsg::InitialSync { + let (state, entity, server_info, world_map) = match postbox.next_message()? { + ServerMsg::InitialSync { entity_package, server_info, time_of_day, world_map: (map_size, world_map), - }) => { + } => { // TODO: Display that versions don't match in Voxygen if server_info.git_hash != common::util::GIT_HASH.to_string() { log::warn!( @@ -105,6 +106,8 @@ impl Client { ); } + log::debug!("Auth Server: {:?}", server_info.auth_provider); + // Initialize `State` let mut state = State::default(); let entity = state.ecs_mut().apply_entity_package(entity_package); @@ -129,9 +132,7 @@ impl Client { (state, entity, server_info, (world_map, map_size)) }, - Some(ServerMsg::Error(ServerError::TooManyPlayers)) => { - return Err(Error::TooManyPlayers); - }, + ServerMsg::TooManyPlayers => return Err(Error::TooManyPlayers), _ => return Err(Error::ServerWentMad), }; @@ -172,16 +173,40 @@ impl Client { } /// Request a state transition to `ClientState::Registered`. - pub fn register(&mut self, player: comp::Player, password: String) -> Result<(), Error> { - self.postbox - .send_message(ClientMsg::Register { player, password }); + pub fn register( + &mut self, + username: String, + password: String, + mut auth_trusted: impl FnMut(&str) -> bool, + ) -> Result<(), Error> { + // Authentication + let token_or_username = self.server_info.auth_provider.as_ref().map(|addr| + // Query whether this is a trusted auth server + if auth_trusted(&addr) { + Ok(authc::AuthClient::new(addr) + .sign_in(&username, &password)? + .serialize()) + } else { + Err(Error::AuthServerNotTrusted) + } + ).unwrap_or(Ok(username))?; + + self.postbox.send_message(ClientMsg::Register { + view_distance: self.view_distance, + token_or_username, + }); self.client_state = ClientState::Pending; + loop { - match self.postbox.next_message() { - Some(ServerMsg::StateAnswer(Err((RequestStateError::Denied, _)))) => { - break Err(Error::InvalidAuth); + match self.postbox.next_message()? { + ServerMsg::StateAnswer(Err((RequestStateError::RegisterDenied(err), state))) => { + self.client_state = state; + break Err(match err { + RegisterError::AlreadyLoggedIn => Error::AlreadyLoggedIn, + RegisterError::AuthError(err) => Error::AuthErr(err), + }); }, - Some(ServerMsg::StateAnswer(Ok(ClientState::Registered))) => break Ok(()), + ServerMsg::StateAnswer(Ok(ClientState::Registered)) => break Ok(()), _ => {}, } } @@ -546,10 +571,8 @@ impl Client { if new_msgs.len() > 0 { for msg in new_msgs { match msg { - ServerMsg::Error(e) => match e { - ServerError::TooManyPlayers => return Err(Error::ServerWentMad), - ServerError::InvalidAuth => return Err(Error::InvalidAuth), - //TODO: ServerError::InvalidAlias => return Err(Error::InvalidAlias), + ServerMsg::TooManyPlayers => { + return Err(Error::ServerWentMad); }, ServerMsg::Shutdown => return Err(Error::ServerShutdown), ServerMsg::InitialSync { .. } => return Err(Error::ServerWentMad), @@ -692,10 +715,6 @@ impl Client { self.client_state = state; }, ServerMsg::StateAnswer(Err((error, state))) => { - if error == RequestStateError::Denied { - warn!("Connection denied!"); - return Err(Error::InvalidAuth); - } warn!( "StateAnswer: {:?}. Server thinks client is in state {:?}.", error, state diff --git a/common/Cargo.toml b/common/Cargo.toml index f28f688c43..f70c8c1b6c 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -30,9 +30,10 @@ hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] } find_folder = "0.3.0" parking_lot = "0.9.0" crossbeam = "=0.7.2" -notify = "5.0.0-pre.1" +notify = "5.0.0-pre.2" indexmap = "1.3.0" sum_type = "0.2.0" +authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" } [dev-dependencies] criterion = "0.3" diff --git a/common/src/comp/player.rs b/common/src/comp/player.rs index 2078b0efb8..b7a6aa1a3d 100644 --- a/common/src/comp/player.rs +++ b/common/src/comp/player.rs @@ -1,3 +1,4 @@ +use authc::Uuid; use specs::{Component, FlaggedStorage, NullStorage}; use specs_idvs::IDVStorage; @@ -7,20 +8,26 @@ const MAX_ALIAS_LEN: usize = 32; pub struct Player { pub alias: String, pub view_distance: Option, + uuid: Uuid, } impl Player { - pub fn new(alias: String, view_distance: Option) -> Self { + pub fn new(alias: String, view_distance: Option, uuid: Uuid) -> Self { Self { alias, view_distance, + uuid, } } - pub fn is_valid(&self) -> bool { - self.alias.chars().all(|c| c.is_alphanumeric() || c == '_') - && self.alias.len() <= MAX_ALIAS_LEN + pub fn is_valid(&self) -> bool { Self::alias_is_valid(&self.alias) } + + pub fn alias_is_valid(alias: &str) -> bool { + alias.chars().all(|c| c.is_alphanumeric() || c == '_') && alias.len() <= MAX_ALIAS_LEN } + + /// Not to be confused with uid + pub fn uuid(&self) -> Uuid { self.uuid } } impl Component for Player { diff --git a/common/src/msg/client.rs b/common/src/msg/client.rs index b4022483ad..962cf40174 100644 --- a/common/src/msg/client.rs +++ b/common/src/msg/client.rs @@ -4,8 +4,8 @@ use vek::*; #[derive(Debug, Clone, Serialize, Deserialize)] pub enum ClientMsg { Register { - player: comp::Player, - password: String, + view_distance: Option, + token_or_username: String, }, Character { name: String, diff --git a/common/src/msg/mod.rs b/common/src/msg/mod.rs index 1baee67e15..1c04fece94 100644 --- a/common/src/msg/mod.rs +++ b/common/src/msg/mod.rs @@ -6,7 +6,7 @@ pub mod server; pub use self::{ client::ClientMsg, ecs_packet::EcsCompPacket, - server::{PlayerListUpdate, RequestStateError, ServerError, ServerInfo, ServerMsg}, + server::{PlayerListUpdate, RegisterError, RequestStateError, ServerInfo, ServerMsg}, }; #[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)] diff --git a/common/src/msg/server.rs b/common/src/msg/server.rs index 0a7b84ae33..c517eec665 100644 --- a/common/src/msg/server.rs +++ b/common/src/msg/server.rs @@ -4,23 +4,17 @@ use crate::{ terrain::{Block, TerrainChunk}, ChatType, }; +use authc::AuthClientError; use hashbrown::HashMap; use vek::*; -#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] -pub enum RequestStateError { - Denied, - Already, - Impossible, - WrongMessage, -} - #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ServerInfo { pub name: String, pub description: String, pub git_hash: String, pub git_date: String, + pub auth_provider: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -77,18 +71,31 @@ pub enum ServerMsg { chunk: Result, ()>, }, TerrainBlockUpdates(HashMap, Block>), - Error(ServerError), Disconnect, Shutdown, + TooManyPlayers, } -#[derive(Debug, Clone, Serialize, Deserialize)] -pub enum ServerError { - TooManyPlayers, - InvalidAuth, +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub enum RequestStateError { + RegisterDenied(RegisterError), + Denied, + Already, + Impossible, + WrongMessage, +} + +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] +pub enum RegisterError { + AlreadyLoggedIn, + AuthError(String), //TODO: InvalidAlias, } +impl From for RegisterError { + fn from(err: AuthClientError) -> Self { Self::AuthError(err.to_string()) } +} + impl ServerMsg { pub fn chat(message: String) -> ServerMsg { ServerMsg::ChatMsg { diff --git a/common/src/net/post2.rs b/common/src/net/post2.rs index bae88d25f2..ee9e7303e5 100644 --- a/common/src/net/post2.rs +++ b/common/src/net/post2.rs @@ -119,16 +119,16 @@ impl PostBox { pub fn send_message(&mut self, msg: S) { let _ = self.send_tx.send(msg); } - pub fn next_message(&mut self) -> Option { - if self.error.is_some() { - return None; + pub fn next_message(&mut self) -> Result { + if let Some(e) = self.error.clone() { + return Err(e); } - match self.recv_rx.recv().ok()? { - Ok(msg) => Some(msg), + match self.recv_rx.recv().map_err(|_| Error::ChannelFailure)? { + Ok(msg) => Ok(msg), Err(e) => { - self.error = Some(e); - None + self.error = Some(e.clone()); + Err(e) }, } } diff --git a/server/Cargo.toml b/server/Cargo.toml index e6e9917ad7..c86adf42d8 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -31,3 +31,4 @@ prometheus = "0.7" prometheus-static-metric = "0.2" rouille = "3.0.0" portpicker = { git = "https://github.com/wusyong/portpicker-rs", branch = "fix_ipv6" } +authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" } diff --git a/server/src/auth_provider.rs b/server/src/auth_provider.rs index 68160a48e0..03c3db9960 100644 --- a/server/src/auth_provider.rs +++ b/server/src/auth_provider.rs @@ -1,32 +1,88 @@ +use authc::{AuthClient, AuthToken, Uuid}; +use common::msg::RegisterError; use hashbrown::HashMap; -use log::{info, warn}; +use log::error; +use std::str::FromStr; + +fn derive_uuid(username: &str) -> Uuid { + let mut state: [u8; 16] = [ + 52, 17, 19, 239, 52, 17, 19, 239, 52, 17, 19, 239, 52, 17, 19, 239, + ]; + for mix_byte_1 in username.as_bytes() { + for i in 0..16 { + let mix_byte_step: u8 = mix_byte_1 + .wrapping_pow(239) + .wrapping_mul((i as u8).wrapping_pow(43)); + let mix_byte_2 = state[(i + mix_byte_step as usize) % 16]; + let rot_step: u8 = mix_byte_1 + .wrapping_pow(29) + .wrapping_mul((i as u8).wrapping_pow(163)); + state[i] = (state[i] ^ mix_byte_1) + .wrapping_mul(mix_byte_2) + .rotate_left(rot_step as u32); + } + } + Uuid::from_slice(&state).unwrap() +} pub struct AuthProvider { - accounts: HashMap, + accounts: HashMap, + auth_server: Option, } impl AuthProvider { - pub fn new() -> Self { + pub fn new(auth_addr: Option) -> Self { + let auth_server = match auth_addr { + Some(addr) => Some(AuthClient::new(addr)), + None => None, + }; + AuthProvider { accounts: HashMap::new(), + auth_server, } } - pub fn query(&mut self, username: String, password: String) -> bool { - let pwd = password.clone(); - if self.accounts.entry(username.clone()).or_insert_with(|| { - info!("Registered new user '{}'", &username); - pwd - }) == &password - { - info!("User '{}' successfully authenticated", username); - true - } else { - warn!( - "User '{}' attempted to log in with invalid password '{}'!", - username, password - ); - false + pub fn logout(&mut self, uuid: Uuid) { + if self.accounts.remove(&uuid).is_none() { + error!("Attempted to logout user that is not logged in."); + }; + } + + pub fn query(&mut self, username_or_token: String) -> Result<(String, Uuid), RegisterError> { + // Based on whether auth server is provided or not we expect an username or + // token + match &self.auth_server { + // Token from auth server expected + Some(srv) => { + log::info!("Validating '{}' token.", &username_or_token); + // Parse token + let token = AuthToken::from_str(&username_or_token) + .map_err(|e| RegisterError::AuthError(e.to_string()))?; + // Validate token + let uuid = srv.validate(token)?; + // Check if already logged in + if self.accounts.contains_key(&uuid) { + return Err(RegisterError::AlreadyLoggedIn); + } + // Log in + let username = srv.uuid_to_username(uuid)?; + self.accounts.insert(uuid, username.clone()); + Ok((username, uuid)) + }, + // Username is expected + None => { + // Assume username was provided + let username = username_or_token; + let uuid = derive_uuid(&username); + if !self.accounts.contains_key(&uuid) { + log::info!("New User '{}'", username); + self.accounts.insert(uuid, username.clone()); + Ok((username, uuid)) + } else { + Err(RegisterError::AlreadyLoggedIn) + } + }, } } } diff --git a/server/src/lib.rs b/server/src/lib.rs index d9f009a890..c3cc142a63 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -27,7 +27,7 @@ use common::{ assets, comp, effect::Effect, event::{EventBus, ServerEvent}, - msg::{ClientMsg, ClientState, ServerError, ServerInfo, ServerMsg}, + msg::{ClientMsg, ClientState, ServerInfo, ServerMsg}, net::PostOffice, state::{State, TimeOfDay}, sync::{Uid, WorldSyncExt}, @@ -86,7 +86,9 @@ impl Server { let mut state = State::default(); state.ecs_mut().insert(EventBus::::default()); // TODO: anything but this - state.ecs_mut().insert(AuthProvider::new()); + state + .ecs_mut() + .insert(AuthProvider::new(settings.auth_server_address.clone())); state.ecs_mut().insert(Tick(0)); state.ecs_mut().insert(ChunkGenerator::new()); // System timers for performance monitoring @@ -196,6 +198,7 @@ impl Server { description: settings.server_description.clone(), git_hash: common::util::GIT_HASH.to_string(), git_date: common::util::GIT_DATE.to_string(), + auth_provider: settings.auth_server_address.clone(), }, metrics: ServerMetrics::new(settings.metrics_address) .expect("Failed to initialize server metrics submodule."), @@ -502,7 +505,7 @@ impl Server { <= self.state.ecs().read_storage::().join().count() { // Note: in this case the client is dropped - client.notify(ServerMsg::Error(ServerError::TooManyPlayers)); + client.notify(ServerMsg::TooManyPlayers); } else { let entity = self .state diff --git a/server/src/settings.rs b/server/src/settings.rs index 4ab9e0bbd1..12c6fc157f 100644 --- a/server/src/settings.rs +++ b/server/src/settings.rs @@ -10,12 +10,12 @@ const DEFAULT_WORLD_SEED: u32 = 5284; pub struct ServerSettings { pub gameserver_address: SocketAddr, pub metrics_address: SocketAddr, + pub auth_server_address: Option, pub max_players: usize, pub world_seed: u32, //pub pvp_enabled: bool, pub server_name: String, pub server_description: String, - //pub login_server: whatever pub start_time: f64, pub admins: Vec, /// When set to None, loads the default map file (if available); otherwise, @@ -28,6 +28,7 @@ impl Default for ServerSettings { Self { gameserver_address: SocketAddr::from(([0; 4], 14004)), metrics_address: SocketAddr::from(([0; 4], 14005)), + auth_server_address: Some("https://auth.veloren.net".into()), world_seed: DEFAULT_WORLD_SEED, server_name: "Veloren Alpha".to_owned(), server_description: "This is the best Veloren server.".to_owned(), @@ -107,6 +108,7 @@ impl ServerSettings { [127, 0, 0, 1], pick_unused_port().expect("Failed to find unused port!"), )), + auth_server_address: None, // If loading the default map file, make sure the seed is also default. world_seed: if load.map_file.is_some() { load.world_seed diff --git a/server/src/sys/message.rs b/server/src/sys/message.rs index f68d32f9e6..47d02d23c3 100644 --- a/server/src/sys/message.rs +++ b/server/src/sys/message.rs @@ -122,12 +122,27 @@ impl<'a> System<'a> for Sys { }, ClientState::Pending => {}, }, - // Valid player - ClientMsg::Register { player, password } if player.is_valid() => { - if !accounts.query(player.alias.clone(), password) { - client.error_state(RequestStateError::Denied); + // Request registered state (login) + ClientMsg::Register { + view_distance, + token_or_username, + } => { + let (username, uuid) = match accounts.query(token_or_username.clone()) { + Err(err) => { + client.error_state(RequestStateError::RegisterDenied(err)); + break; + }, + Ok((username, uuid)) => (username, uuid), + }; + + let player = Player::new(username, view_distance, uuid); + + if !player.is_valid() { + // Invalid player + client.error_state(RequestStateError::Impossible); break; } + match client.client_state { ClientState::Connected => { // Add Player component to this client @@ -148,8 +163,6 @@ impl<'a> System<'a> for Sys { } //client.allow_state(ClientState::Registered); }, - // Invalid player - ClientMsg::Register { .. } => client.error_state(RequestStateError::Impossible), ClientMsg::SetViewDistance(view_distance) => match client.client_state { ClientState::Character { .. } => { players @@ -287,6 +300,7 @@ impl<'a> System<'a> for Sys { None, ServerMsg::broadcast(format!("{} went offline.", &player.alias)), )); + accounts.logout(player.uuid()); } server_emitter.emit(ServerEvent::ClientDisconnect(entity)); client.postbox.send_message(ServerMsg::Disconnect); diff --git a/voxygen/Cargo.toml b/voxygen/Cargo.toml index 9ae1608213..a4e5c7cff5 100644 --- a/voxygen/Cargo.toml +++ b/voxygen/Cargo.toml @@ -24,8 +24,8 @@ gfx_device_gl = { version = "0.16.2", optional = true } gfx_window_glutin = "0.31.0" glutin = "0.21.1" winit = { version = "0.19.4", features = ["serde"] } -conrod_core = { git = "https://gitlab.com/veloren/conrod.git" } -conrod_winit = { git = "https://gitlab.com/veloren/conrod.git" } +conrod_core = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } +conrod_winit = { git = "https://gitlab.com/veloren/conrod.git", branch = "hide_text" } euc = "0.3.0" # ECS @@ -60,10 +60,10 @@ cpal = "0.10" crossbeam = "=0.7.2" hashbrown = { version = "0.6.2", features = ["rayon", "serde", "nightly"] } chrono = "0.4.9" -rust-argon2 = "0.5" bincode = "1.2" deunicode = "1.0" uvth = "3.1.1" +authc = { git = "https://gitlab.com/veloren/auth.git", rev = "65571ade0d954a0e0bd995fdb314854ff146ab97" } [target.'cfg(target_os = "macos")'.dependencies] dispatch = "0.1.4" diff --git a/voxygen/src/menu/main/client_init.rs b/voxygen/src/menu/main/client_init.rs index 95be603556..87e33fee55 100644 --- a/voxygen/src/menu/main/client_init.rs +++ b/voxygen/src/menu/main/client_init.rs @@ -1,6 +1,6 @@ use client::{error::Error as ClientError, Client}; -use common::{comp, net::PostError}; -use crossbeam::channel::{unbounded, Receiver, TryRecvError}; +use common::net::PostError; +use crossbeam::channel::{unbounded, Receiver, Sender, TryRecvError}; use std::{ net::ToSocketAddrs, sync::{ @@ -15,32 +15,39 @@ use std::{ pub enum Error { // Error parsing input string or error resolving host name. BadAddress(std::io::Error), - // Parsing/host name resolution successful but could not connect. - #[allow(dead_code)] - ConnectionFailed(ClientError), + // Parsing/host name resolution successful but there was an error within the client. + ClientError(ClientError), // Parsing yielded an empty iterator (specifically to_socket_addrs()). NoAddress, - InvalidAuth, ClientCrashed, - ServerIsFull, } +pub enum Msg { + IsAuthTrusted(String), + Done(Result), +} + +pub struct AuthTrust(String, bool); + // Used to asynchronously parse the server address, resolve host names, // and create the client (which involves establishing a connection to the // server). pub struct ClientInit { - rx: Receiver>, + rx: Receiver, + trust_tx: Sender, cancel: Arc, } impl ClientInit { pub fn new( connection_args: (String, u16, bool), - player: comp::Player, + username: String, + view_distance: Option, password: String, ) -> Self { let (server_address, default_port, prefer_ipv6) = connection_args; let (tx, rx) = unbounded(); + let (trust_tx, trust_rx) = unbounded(); let cancel = Arc::new(AtomicBool::new(false)); let cancel2 = Arc::clone(&cancel); @@ -66,40 +73,39 @@ impl ClientInit { for socket_addr in first_addrs.clone().into_iter().chain(second_addrs.clone()) { - match Client::new(socket_addr, player.view_distance) { + match Client::new(socket_addr, view_distance) { Ok(mut client) => { - if let Err(ClientError::InvalidAuth) = - client.register(player.clone(), password.clone()) + if let Err(err) = + client.register(username, password, |auth_server| { + let _ = tx + .send(Msg::IsAuthTrusted(auth_server.to_string())); + trust_rx + .recv() + .map(|AuthTrust(server, trust)| { + trust && &server == auth_server + }) + .unwrap_or(false) + }) { - last_err = Some(Error::InvalidAuth); - break; + last_err = Some(Error::ClientError(err)); + break 'tries; } - //client.register(player, password); - let _ = tx.send(Ok(client)); + let _ = tx.send(Msg::Done(Ok(client))); return; }, Err(err) => { match err { ClientError::Network(PostError::Bincode(_)) => { - last_err = Some(Error::ConnectionFailed(err)); + last_err = Some(Error::ClientError(err)); break 'tries; }, // Assume the connection failed and try again soon ClientError::Network(_) => {}, - ClientError::TooManyPlayers => { - last_err = Some(Error::ServerIsFull); + // Non-connection error, stop attempts + err => { + last_err = Some(Error::ClientError(err)); break 'tries; }, - ClientError::InvalidAuth => { - last_err = Some(Error::InvalidAuth); - break 'tries; - }, - // TODO: Handle errors? - _ => panic!( - "Unexpected non-network error when creating client: \ - {:?}", - err - ), } }, } @@ -107,29 +113,38 @@ impl ClientInit { thread::sleep(Duration::from_secs(5)); } // Parsing/host name resolution successful but no connection succeeded. - let _ = tx.send(Err(last_err.unwrap_or(Error::NoAddress))); + let _ = tx.send(Msg::Done(Err(last_err.unwrap_or(Error::NoAddress)))); }, Err(err) => { // Error parsing input string or error resolving host name. - let _ = tx.send(Err(Error::BadAddress(err))); + let _ = tx.send(Msg::Done(Err(Error::BadAddress(err)))); }, } }); - ClientInit { rx, cancel } + ClientInit { + rx, + trust_tx, + cancel, + } } /// Poll if the thread is complete. /// Returns None if the thread is still running, otherwise returns the /// Result of client creation. - pub fn poll(&self) -> Option> { + pub fn poll(&self) -> Option { match self.rx.try_recv() { - Ok(result) => Some(result), + Ok(msg) => Some(msg), Err(TryRecvError::Empty) => None, - Err(TryRecvError::Disconnected) => Some(Err(Error::ClientCrashed)), + Err(TryRecvError::Disconnected) => Some(Msg::Done(Err(Error::ClientCrashed))), } } + /// Report trust status of auth server + pub fn auth_trust(&self, auth_server: String, trusted: bool) { + let _ = self.trust_tx.send(AuthTrust(auth_server, trusted)); + } + pub fn cancel(&mut self) { self.cancel.store(true, Ordering::Relaxed); } } diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 504e3d6dc9..145d8e9b16 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -3,15 +3,11 @@ mod client_init; use super::char_selection::CharSelectionState; use crate::{ - i18n::{i18n_asset_key, VoxygenLocalization}, - singleplayer::Singleplayer, - window::Event, - Direction, GlobalState, PlayState, PlayStateResult, + singleplayer::Singleplayer, window::Event, Direction, GlobalState, PlayState, PlayStateResult, }; -use argon2::{self, Config}; -use client_init::{ClientInit, Error as InitError}; +use client_init::{ClientInit, Error as InitError, Msg as InitMsg}; use common::{assets::load_expect, clock::Clock, comp}; -use log::warn; +use log::{error, warn}; #[cfg(feature = "singleplayer")] use std::time::Duration; use ui::{Event as MainMenuEvent, MainMenuUi}; @@ -47,6 +43,10 @@ impl PlayState for MainMenuState { // Reset singleplayer server if it was running already global_state.singleplayer = None; + let localized_strings = load_expect::( + &crate::i18n::i18n_asset_key(&global_state.settings.language.selected_language), + ); + loop { // Handle window events. for event in global_state.window.fetch_events(&mut global_state.settings) { @@ -65,7 +65,7 @@ impl PlayState for MainMenuState { // Poll client creation. match client_init.as_ref().and_then(|init| init.poll()) { - Some(Ok(mut client)) => { + Some(InitMsg::Done(Ok(mut client))) => { self.main_menu_ui.connected(); // Register voxygen components / resources crate::ecs::init(client.state_mut().ecs_mut()); @@ -74,18 +74,82 @@ impl PlayState for MainMenuState { std::rc::Rc::new(std::cell::RefCell::new(client)), ))); }, - Some(Err(err)) => { + Some(InitMsg::Done(Err(err))) => { client_init = None; - global_state.info_message = Some( - match err { - InitError::BadAddress(_) | InitError::NoAddress => "Server not found", - InitError::InvalidAuth => "Invalid credentials", - InitError::ServerIsFull => "Server is full", - InitError::ConnectionFailed(_) => "Connection failed", - InitError::ClientCrashed => "Client crashed", - } - .to_string(), - ); + global_state.info_message = Some({ + let err = match err { + InitError::BadAddress(_) | InitError::NoAddress => { + localized_strings.get("main.login.server_not_found").into() + }, + InitError::ClientError(err) => match err { + client::Error::AuthErr(e) => format!( + "{}: {}", + localized_strings.get("main.login.authentication_error"), + e + ), + client::Error::TooManyPlayers => { + localized_strings.get("main.login.server_full").into() + }, + client::Error::AuthServerNotTrusted => localized_strings + .get("main.login.untrusted_auth_server") + .into(), + client::Error::ServerWentMad => localized_strings + .get("main.login.outdated_client_or_server") + .into(), + client::Error::ServerTimeout => { + localized_strings.get("main.login.timeout").into() + }, + client::Error::ServerShutdown => { + localized_strings.get("main.login.server_shut_down").into() + }, + client::Error::AlreadyLoggedIn => { + localized_strings.get("main.login.already_logged_in").into() + }, + client::Error::Network(e) => format!( + "{}: {:?}", + localized_strings.get("main.login.network_error"), + e + ), + client::Error::Other(e) => { + format!("{}: {}", localized_strings.get("common.error"), e) + }, + client::Error::AuthClientError(e) => match e { + client::AuthClientError::JsonError(e) => format!( + "{}: {}", + localized_strings.get("common.fatal_error"), + e + ), + client::AuthClientError::RequestError(_) => format!( + "{}: {}", + localized_strings.get("main.login.failed_sending_request"), + e + ), + client::AuthClientError::ServerError(_, e) => format!("{}", e), + }, + }, + InitError::ClientCrashed => { + localized_strings.get("main.login.client_crashed").into() + }, + }; + // Log error for possible additional use later or incase that the error + // displayed is cut of. + error!("{}", err); + err + }); + }, + Some(InitMsg::IsAuthTrusted(auth_server)) => { + if global_state + .settings + .networking + .trusted_auth_servers + .contains(&auth_server) + { + // Can't fail since we just polled it, it must be Some + client_init.as_ref().unwrap().auth_trust(auth_server, true); + } else { + // Show warning that auth server is not trusted and prompt for approval + self.main_menu_ui.auth_trust_prompt(auth_server); + } }, None => {}, } @@ -141,15 +205,24 @@ impl PlayState for MainMenuState { MainMenuEvent::DisclaimerClosed => { global_state.settings.show_disclaimer = false }, + MainMenuEvent::AuthServerTrust(auth_server, trust) => { + if trust { + global_state + .settings + .networking + .trusted_auth_servers + .insert(auth_server.clone()); + global_state.settings.save_to_file_warn(); + } + client_init + .as_ref() + .map(|init| init.auth_trust(auth_server, trust)); + }, } } - let localized_strings = load_expect::(&i18n_asset_key( - &global_state.settings.language.selected_language, - )); if let Some(info) = global_state.info_message.take() { - self.main_menu_ui - .show_info(info, localized_strings.get("common.okay").to_owned()); + self.main_menu_ui.show_info(info); } // Draw the UI to the screen. @@ -190,25 +263,17 @@ fn attempt_login( warn!("Failed to save settings: {:?}", err); } - let player = comp::Player::new( - username.clone(), - Some(global_state.settings.graphics.view_distance), - ); - - if player.is_valid() { + if comp::Player::alias_is_valid(&username) { // Don't try to connect if there is already a connection in progress. if client_init.is_none() { *client_init = Some(ClientInit::new( (server_address, server_port, false), - player, - { - let salt = b"staticsalt_zTuGkGvybZIjZbNUDtw15"; - let config = Config::default(); - argon2::hash_encoded(password.as_bytes(), salt, &config).unwrap() - }, + username, + Some(global_state.settings.graphics.view_distance), + { password }, )); } } else { - global_state.info_message = Some("Invalid username or password".to_string()); + global_state.info_message = Some("Invalid username".to_string()); } } diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index 43d1e774ff..8832cc7e59 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -68,7 +68,9 @@ widget_ids! { // Info Window info_frame, info_text, - info_bottom + info_bottom, + // Auth Trust Prompt + button_add_auth_trust, } } @@ -90,7 +92,7 @@ image_ids! { button_hover: "voxygen.element.buttons.button_hover", button_press: "voxygen.element.buttons.button_press", input_bg_top: "voxygen.element.misc_bg.textbox_top", - //input_bg_mid: "voxygen.element.misc_bg.textbox_mid", <-- For password input + input_bg_mid: "voxygen.element.misc_bg.textbox_mid", input_bg_bot: "voxygen.element.misc_bg.textbox_bot", @@ -122,16 +124,17 @@ pub enum Event { Quit, Settings, DisclaimerClosed, + AuthServerTrust(String, bool), } pub enum PopupType { Error, ConnectionInfo, + AuthTrustPrompt(String), } pub struct PopupData { msg: String, - button_text: String, popup_type: PopupType, } @@ -261,27 +264,51 @@ impl MainMenuUi { .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(14)) .set(self.ids.version, ui_widgets); - // Popup (Error/Info) - if let Some(popup_data) = &self.popup { - let text = Text::new(&popup_data.msg) - .rgba(1.0, 1.0, 1.0, if self.connect { fade_msg } else { 1.0 }) + + // Popup (Error/Info/AuthTrustPrompt) + let mut change_popup = None; + if let Some(PopupData { msg, popup_type }) = &self.popup { + let text = Text::new(msg) + .rgba( + 1.0, + 1.0, + 1.0, + if let PopupType::ConnectionInfo = popup_type { + fade_msg + } else { + 1.0 + }, + ) .font_id(self.fonts.cyri.conrod_id); - Rectangle::fill_with([65.0 * 6.0, 140.0], color::TRANSPARENT) + let (frame_w, frame_h) = if let PopupType::AuthTrustPrompt(_) = popup_type { + (65.0 * 8.0, 370.0) + } else { + (65.0 * 6.0, 140.0) + }; + let error_bg = Rectangle::fill_with([frame_w, frame_h], color::TRANSPARENT) .rgba(0.1, 0.1, 0.1, if self.connect { 0.0 } else { 1.0 }) - .parent(ui_widgets.window) - .up_from(self.ids.banner_top, 15.0) - .set(self.ids.login_error_bg, ui_widgets); + .parent(ui_widgets.window); + if let PopupType::AuthTrustPrompt(_) = popup_type { + error_bg.middle_of(ui_widgets.window) + } else { + error_bg.up_from(self.ids.banner_top, 15.0) + } + .set(self.ids.login_error_bg, ui_widgets); Image::new(self.imgs.info_frame) - .w_h(65.0 * 6.0, 140.0) + .w_h(frame_w, frame_h) .color(Some(Color::Rgba( 1.0, 1.0, 1.0, - if self.connect { 0.0 } else { 1.0 }, + if let PopupType::ConnectionInfo = popup_type { + 0.0 + } else { + 1.0 + }, ))) .middle_of(self.ids.login_error_bg) .set(self.ids.error_frame, ui_widgets); - if self.connect { + if let PopupType::ConnectionInfo = popup_type { text.mid_top_with_margin_on(self.ids.error_frame, 10.0) .font_id(self.fonts.alkhemi.conrod_id) .bottom_left_with_margins_on(ui_widgets.window, 60.0, 60.0) @@ -289,6 +316,7 @@ impl MainMenuUi { .set(self.ids.login_error, ui_widgets); } else { text.mid_top_with_margin_on(self.ids.error_frame, 10.0) + .w(frame_w - 10.0 * 2.0) .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(25)) .set(self.ids.login_error, ui_widgets); @@ -296,7 +324,7 @@ impl MainMenuUi { if Button::image(self.imgs.button) .w_h(100.0, 30.0) .mid_bottom_with_margin_on( - if self.connect { + if let PopupType::ConnectionInfo = popup_type { ui_widgets.window } else { self.ids.login_error_bg @@ -306,22 +334,55 @@ impl MainMenuUi { .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) .label_y(Relative::Scalar(2.0)) - .label(&popup_data.button_text) + .label(match popup_type { + PopupType::Error => self.voxygen_i18n.get("common.okay"), + PopupType::ConnectionInfo => self.voxygen_i18n.get("common.cancel"), + PopupType::AuthTrustPrompt(_) => self.voxygen_i18n.get("common.cancel"), + }) .label_font_id(self.fonts.cyri.conrod_id) .label_font_size(self.fonts.cyri.scale(15)) .label_color(TEXT_COLOR) .set(self.ids.button_ok, ui_widgets) .was_clicked() { - match popup_data.popup_type { + match &popup_type { + PopupType::Error => (), PopupType::ConnectionInfo => { events.push(Event::CancelLoginAttempt); }, - _ => (), + PopupType::AuthTrustPrompt(auth_server) => { + events.push(Event::AuthServerTrust(auth_server.clone(), false)); + }, }; - self.popup = None; - }; + change_popup = Some(None); + } + + if let PopupType::AuthTrustPrompt(auth_server) = popup_type { + if Button::image(self.imgs.button) + .w_h(100.0, 30.0) + .right_from(self.ids.button_ok, 10.0) + .hover_image(self.imgs.button_hover) + .press_image(self.imgs.button_press) + .label_y(Relative::Scalar(2.0)) + .label("Add") // TODO: localize + .label_font_id(self.fonts.cyri.conrod_id) + .label_font_size(self.fonts.cyri.scale(15)) + .label_color(TEXT_COLOR) + .set(self.ids.button_add_auth_trust, ui_widgets) + .was_clicked() + { + events.push(Event::AuthServerTrust(auth_server.clone(), true)); + change_popup = Some(Some(PopupData { + msg: self.voxygen_i18n.get("main.connecting").into(), + popup_type: PopupType::ConnectionInfo, + })); + } + } } + if let Some(p) = change_popup { + self.popup = p; + } + if !self.connect { Image::new(self.imgs.banner) .w_h(65.0 * 6.0, 100.0 * 6.0) @@ -387,7 +448,6 @@ impl MainMenuUi { self.connecting = Some(std::time::Instant::now()); self.popup = Some(PopupData { msg: [self.voxygen_i18n.get("main.connecting"), "..."].concat(), - button_text: self.voxygen_i18n.get("common.cancel").to_owned(), popup_type: PopupType::ConnectionInfo, }); @@ -399,7 +459,7 @@ impl MainMenuUi { }; } // Info Window - Rectangle::fill_with([550.0, 200.0], color::BLACK) + Rectangle::fill_with([550.0, 400.0], color::BLACK) .top_left_with_margins_on(ui_widgets.window, 40.0, 40.0) .color(Color::Rgba(0.0, 0.0, 0.0, 0.95)) .set(self.ids.info_frame, ui_widgets); @@ -425,7 +485,6 @@ impl MainMenuUi { self.connecting = Some(std::time::Instant::now()); self.popup = Some(PopupData { msg: [self.voxygen_i18n.get("main.creating_world"), "..."].concat(), - button_text: self.voxygen_i18n.get("common.cancel").to_owned(), popup_type: PopupType::ConnectionInfo, }); }; @@ -461,14 +520,12 @@ impl MainMenuUi { } } // Password - // TODO: REACTIVATE THIS WHEN A PROPER ACCOUNT SYSTEM IS IN PLACE - /*Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97)) + Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97)) .down_from(self.ids.usrnm_bg, 30.0) .set(self.ids.passwd_bg, ui_widgets); Image::new(self.imgs.input_bg_mid) .w_h(337.0, 67.0) .middle_of(self.ids.passwd_bg) - .color(Some(INACTIVE)) .set(self.ids.password_bg, ui_widgets); for event in TextBox::new(&self.password) .w_h(290.0, 30.0) @@ -479,18 +536,20 @@ impl MainMenuUi { // transparent background .color(TRANSPARENT) .border_color(TRANSPARENT) + .hide_text("*") .set(self.ids.password_field, ui_widgets) { match event { TextBoxEvent::Update(password) => { // Note: TextBox limits the input string length to what fits in it self.password = password; - } + }, TextBoxEvent::Enter => { login!(); - } + }, } - }*/ + } + if self.show_servers { Image::new(self.imgs.info_frame) .mid_top_with_margin_on(self.ids.username_bg, -320.0) @@ -556,7 +615,7 @@ impl MainMenuUi { } // Server address Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97)) - .down_from(self.ids.usrnm_bg, 30.0) + .down_from(self.ids.passwd_bg, 30.0) .set(self.ids.srvr_bg, ui_widgets); Image::new(self.imgs.input_bg_bot) .w_h(337.0, 67.0) @@ -582,6 +641,7 @@ impl MainMenuUi { }, } } + // Login button if Button::image(self.imgs.button) .hover_image(self.imgs.button_hover) @@ -684,10 +744,22 @@ impl MainMenuUi { events } - pub fn show_info(&mut self, msg: String, button_text: String) { + pub fn auth_trust_prompt(&mut self, auth_server: String) { + self.popup = Some(PopupData { + msg: format!( + "Warning: The server you are trying to connect to has provided this \ + authentication server address:\n\n{}\n\nbut it is not in your list of trusted \ + authentication servers.\n\nMake sure that you trust this site and owner to not \ + try and bruteforce your password!", + &auth_server + ), + popup_type: PopupType::AuthTrustPrompt(auth_server), + }) + } + + pub fn show_info(&mut self, msg: String) { self.popup = Some(PopupData { msg, - button_text, popup_type: PopupType::Error, }); self.connecting = None; diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 5bae056d85..854464422f 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -7,6 +7,7 @@ use crate::{ }; use directories::{ProjectDirs, UserDirs}; use glutin::{MouseButton, VirtualKeyCode}; +use hashbrown::HashSet; use log::warn; use serde_derive::{Deserialize, Serialize}; use std::{fs, io::prelude::*, path::PathBuf}; @@ -157,6 +158,7 @@ pub struct NetworkingSettings { pub password: String, pub servers: Vec, pub default_server: usize, + pub trusted_auth_servers: HashSet, } impl Default for NetworkingSettings { @@ -166,6 +168,10 @@ impl Default for NetworkingSettings { password: String::default(), servers: vec!["server.veloren.net".to_string()], default_server: 0, + trusted_auth_servers: ["https://auth.veloren.net"] + .iter() + .map(|s| s.to_string()) + .collect(), } } } diff --git a/world/Cargo.toml b/world/Cargo.toml index 9430acc0d9..4dd4c22b71 100644 --- a/world/Cargo.toml +++ b/world/Cargo.toml @@ -28,5 +28,5 @@ serde_derive = "1.0.102" ron = "0.5.1" [dev-dependencies] -minifb = { git = "https://github.com/emoon/rust_minifb.git" } pretty_env_logger = "0.3.0" +minifb = "0.14.0"