Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

login with browser using nonce #4057

Merged
merged 28 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3294714
login with browser using nonce
dynamite-bud Jul 6, 2023
1ec4740
implemented the top layer for logging in with a browser
dynamite-bud Jul 6, 2023
d10cadd
added browser functionality in main login command with --no-browser c…
dynamite-bud Jul 6, 2023
6ab96a8
made prompting for `do you want to open in browser`
dynamite-bud Jul 6, 2023
1facf8d
happy with the flow
dynamite-bud Jul 7, 2023
edc451c
cosmetic changes to input prompt
dynamite-bud Jul 7, 2023
6ca884b
cosmetic changes for log prompt
dynamite-bud Jul 7, 2023
49fd92b
ayush's reviewed changes
dynamite-bud Jul 7, 2023
30b7e75
already logged in message changed
dynamite-bud Jul 7, 2023
966c3f8
timeout implemented for 10 minutes
dynamite-bud Jul 7, 2023
e09c043
texts same as suggestions
dynamite-bud Jul 7, 2023
f7d55b5
Authorization with all states, cancel, timeout and success
dynamite-bud Jul 7, 2023
ebc99cd
http server switched to barebones hyper
dynamite-bud Jul 8, 2023
612fabd
ValidatedNonceOutput TokenStatus added
dynamite-bud Jul 8, 2023
ff13040
added quotes in login message
dynamite-bud Jul 8, 2023
70d676e
moved types to login
dynamite-bud Jul 9, 2023
e64411d
case where user pastes a token
dynamite-bud Jul 10, 2023
58bd969
doc suggestion
dynamite-bud Jul 10, 2023
ba3f1e8
new line after Cancelled
dynamite-bud Jul 10, 2023
d807e3f
multiply the numbers directly in timeout
dynamite-bud Jul 10, 2023
d8ddc21
Merge branch 'master' into cli-login-through-browser
syrusakbary Jul 10, 2023
15319ff
Message formatting for wrong token error
dynamite-bud Jul 10, 2023
5fc96b8
Merge branch 'cli-login-through-browser' of https://github.com/wasmer…
dynamite-bud Jul 10, 2023
85de7b4
warning message exchanged with error for wrong token
dynamite-bud Jul 10, 2023
8c3feac
newline after warning
dynamite-bud Jul 10, 2023
92472d0
Merge branch 'master' of https://github.com/wasmerio/wasmer into cli-…
dynamite-bud Jul 11, 2023
3eb3cf3
ignore the pure_webc_package test
dynamite-bud Jul 11, 2023
9d0027b
login_works test updated
dynamite-bud Jul 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 96 additions & 21 deletions lib/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,41 @@ required-features = ["headless"]
[dependencies]
# Repo-local dependencies.
wasmer = { version = "=4.0.0", path = "../api", default-features = false }
wasmer-compiler = { version = "=4.0.0", path = "../compiler", features = ["compiler"], optional = true }
wasmer-compiler = { version = "=4.0.0", path = "../compiler", features = [
"compiler",
], optional = true }
wasmer-compiler-cranelift = { version = "=4.0.0", path = "../compiler-cranelift", optional = true }
wasmer-compiler-singlepass = { version = "=4.0.0", path = "../compiler-singlepass", optional = true }
wasmer-compiler-llvm = { version = "=4.0.0", path = "../compiler-llvm", optional = true }
wasmer-emscripten = { version = "=4.0.0", path = "../emscripten" }
wasmer-vm = { version = "=4.0.0", path = "../vm", optional = true }
wasmer-wasix = { version = "0.9.0", path = "../wasix", features = ["logging", "webc_runner", "webc_runner_rt_wcgi", "webc_runner_rt_wasi", "webc_runner_rt_emscripten", "host-fs"] }
wasmer-wasix-experimental-io-devices = { version = "0.9.0", path = "../wasi-experimental-io-devices", optional = true, features = ["link_external_libs"] }
wasmer-wasix = { version = "0.9.0", path = "../wasix", features = [
"logging",
"webc_runner",
"webc_runner_rt_wcgi",
"webc_runner_rt_wasi",
"webc_runner_rt_emscripten",
"host-fs",
] }
wasmer-wasix-experimental-io-devices = { version = "0.9.0", path = "../wasi-experimental-io-devices", optional = true, features = [
"link_external_libs",
] }
wasmer-wast = { version = "=4.0.0", path = "../../tests/lib/wast", optional = true }
wasmer-cache = { version = "=4.0.0", path = "../cache", features = ["blake3-pure"] }
wasmer-types = { version = "=4.0.0", path = "../types", features = ["enable-serde"] }
wasmer-registry = { version = "5.2.0", path = "../registry", features = ["build-package", "clap"] }
wasmer-cache = { version = "=4.0.0", path = "../cache", features = [
"blake3-pure",
] }
wasmer-types = { version = "=4.0.0", path = "../types", features = [
"enable-serde",
] }
wasmer-registry = { version = "5.2.0", path = "../registry", features = [
"build-package",
"clap",
] }
wasmer-object = { version = "=4.0.0", path = "../object", optional = true }
virtual-fs = { version = "0.6.0", path = "../virtual-fs", default-features = false, features = ["host-fs"] }
virtual-net = { version = "0.3.0", path = "../virtual-net" }
virtual-fs = { version = "0.6.0", path = "../virtual-fs", default-features = false, features = [
"host-fs",
] }
virtual-net = { version = "0.3.0", path = "../virtual-net" }

# Wasmer-owned dependencies.
webc = { workspace = true }
Expand Down Expand Up @@ -90,11 +110,13 @@ sha2 = "0.10.6"
object = "0.30.0"
wasm-coredump-builder = { version = "0.1.11", optional = true }
tracing = { version = "0.1" }
tracing-subscriber = { version = "0.3", features = [ "env-filter", "fmt" ] }
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
async-trait = "0.1.68"
tokio = { version = "1.28.1", features = ["macros", "rt-multi-thread"] }
once_cell = "1.17.1"
indicatif = "0.17.5"
opener = "0.6.1"
hyper = { version = "0.14.27", features = ["server"] }

# NOTE: Must use different features for clap because the "color" feature does not
# work on wasi due to the anstream dependency not compiling.
Expand All @@ -109,46 +131,99 @@ clap = { version = "4.2.7", default-features = false, features = [
"suggestions",
"derive",
"env",
]}
] }

[target.'cfg(not(target_arch = "riscv64"))'.dependencies]
reqwest = { version = "^0.11", default-features = false, features = ["rustls-tls", "json", "multipart"] }
reqwest = { version = "^0.11", default-features = false, features = [
"rustls-tls",
"json",
"multipart",
] }

[target.'cfg(target_arch = "riscv64")'.dependencies]
reqwest = { version = "^0.11", default-features = false, features = ["native-tls", "json", "multipart"] }
reqwest = { version = "^0.11", default-features = false, features = [
"native-tls",
"json",
"multipart",
] }

[build-dependencies]
chrono = { version = "^0.4", default-features = false, features = ["std", "clock"] }
chrono = { version = "^0.4", default-features = false, features = [
"std",
"clock",
] }

[target.'cfg(target_os = "linux")'.dependencies]
unix_mode = "0.1.3"

[features]
# Don't add the compiler features in default, please add them on the Makefile
# since we might want to autoconfigure them depending on the availability on the host.
default = ["sys", "wat", "wast", "compiler", "wasmer-artifact-create", "static-artifact-create"]
default = [
"sys",
"wat",
"wast",
"compiler",
"wasmer-artifact-create",
"static-artifact-create",
]
backend = []
coredump = ["wasm-coredump-builder"]
sys = ["compiler", "wasmer-vm"]
jsc = ["backend", "wasmer/jsc", "wasmer/std"]
wast = ["wasmer-wast"]
host-net = ["virtual-net/host-net"]
wat = ["wasmer/wat"]
compiler = ["backend", "wasmer/compiler", "wasmer-compiler/translator", "wasmer-compiler/compiler"]
wasmer-artifact-create = ["compiler", "wasmer/wasmer-artifact-load", "wasmer/wasmer-artifact-create", "wasmer-compiler/wasmer-artifact-load", "wasmer-compiler/wasmer-artifact-create", "wasmer-object"]
static-artifact-create = ["compiler", "wasmer/static-artifact-load", "wasmer/static-artifact-create", "wasmer-compiler/static-artifact-load", "wasmer-compiler/static-artifact-create", "wasmer-object"]
wasmer-artifact-load = ["compiler", "wasmer/wasmer-artifact-load", "wasmer-compiler/wasmer-artifact-load"]
static-artifact-load = ["compiler", "wasmer/static-artifact-load", "wasmer-compiler/static-artifact-load"]
compiler = [
"backend",
"wasmer/compiler",
"wasmer-compiler/translator",
"wasmer-compiler/compiler",
]
wasmer-artifact-create = [
"compiler",
"wasmer/wasmer-artifact-load",
"wasmer/wasmer-artifact-create",
"wasmer-compiler/wasmer-artifact-load",
"wasmer-compiler/wasmer-artifact-create",
"wasmer-object",
]
static-artifact-create = [
"compiler",
"wasmer/static-artifact-load",
"wasmer/static-artifact-create",
"wasmer-compiler/static-artifact-load",
"wasmer-compiler/static-artifact-create",
"wasmer-object",
]
wasmer-artifact-load = [
"compiler",
"wasmer/wasmer-artifact-load",
"wasmer-compiler/wasmer-artifact-load",
]
static-artifact-load = [
"compiler",
"wasmer/static-artifact-load",
"wasmer-compiler/static-artifact-load",
]
experimental-io-devices = ["wasmer-wasix-experimental-io-devices"]
singlepass = ["wasmer-compiler-singlepass", "compiler"]
cranelift = ["wasmer-compiler-cranelift", "compiler"]
llvm = ["wasmer-compiler-llvm", "compiler"]
disable-all-logging = ["wasmer-wasix/disable-all-logging", "log/release_max_level_off"]
disable-all-logging = [
"wasmer-wasix/disable-all-logging",
"log/release_max_level_off",
]
headless = []
headless-minimal = ["headless", "disable-all-logging"]

# Optional
enable-serde = ["wasmer/enable-serde", "wasmer-vm/enable-serde", "wasmer-compiler/enable-serde", "wasmer-wasix/enable-serde"]
enable-serde = [
"wasmer/enable-serde",
"wasmer-vm/enable-serde",
"wasmer-compiler/enable-serde",
"wasmer-wasix/enable-serde",
]

[dev-dependencies]
assert_cmd = "2.0.11"
Expand Down
Loading
Loading