-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding WASM back in to tutorial * fix(tutorial): make the axum tutorial use javascript by default * fixing tutorial things * updates
- Loading branch information
Showing
7 changed files
with
37 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
version = "0.5.1" | ||
authors = [ | ||
"William Brown <[email protected]>", | ||
"Michael Farrell <[email protected]>" | ||
"Michael Farrell <[email protected]>", | ||
] | ||
rust-version = "1.81" | ||
edition = "2021" | ||
|
@@ -33,6 +33,7 @@ members = [ | |
"tutorial/server/tide", | ||
"tutorial/server/axum", | ||
"tutorial/server/actix_web", | ||
"tutorial/wasm", | ||
# Attestatation struct format | ||
"attestation-ca", | ||
# Fido MDS tools | ||
|
@@ -51,10 +52,7 @@ members = [ | |
] | ||
|
||
# Due to --cfg=web_sys_unstable_apis | ||
exclude = [ | ||
"compat_tester/webauthn-rs-demo-wasm", | ||
"tutorial/wasm", | ||
] | ||
exclude = ["compat_tester/webauthn-rs-demo-wasm", "tutorial/wasm"] | ||
|
||
[workspace.dependencies] | ||
# These are in release/dependency order. | ||
|
@@ -81,19 +79,17 @@ hex = "0.4.3" | |
http = "^0.2.9" | ||
http-body = "1.0.1" | ||
http-body-util = "0.1.2" | ||
hyper = { version = "1.5.1", default-features = false, features = [ | ||
"http1", | ||
] } | ||
hyper-util = { version = "0.1.10", features = [ | ||
"tokio", | ||
] } | ||
hyper = { version = "1.5.1", default-features = false, features = ["http1"] } | ||
hyper-util = { version = "0.1.10", features = ["tokio"] } | ||
nom = "7.1" | ||
peg = "0.8.1" | ||
openssl = "^0.10.56" | ||
|
||
rand = "0.8" | ||
rand_chacha = "0.3.1" | ||
reqwest = { version = "0.12", default-features = false, features = [ "rustls-tls-native-roots" ] } | ||
reqwest = { version = "0.12", default-features = false, features = [ | ||
"rustls-tls-native-roots", | ||
] } | ||
|
||
serde = { version = "^1.0.141", features = ["derive"] } | ||
serde_cbor_2 = { version = "0.12.0-dev" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,9 @@ | |
name = "axum_tutorial" | ||
version = "0.1.0" | ||
edition = "2021" | ||
authors = ["William Brown <[email protected]>, Ben Wishovich <[email protected]>"] | ||
authors = [ | ||
"William Brown <[email protected]>, Ben Wishovich <[email protected]>", | ||
] | ||
license = "MPL-2.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
@@ -11,7 +13,9 @@ license = "MPL-2.0" | |
tracing.workspace = true | ||
tracing-subscriber.workspace = true | ||
serde.workspace = true | ||
webauthn-rs = { workspace = true, features = ["danger-allow-state-serialisation"] } | ||
webauthn-rs = { workspace = true, features = [ | ||
"danger-allow-state-serialisation", | ||
] } | ||
axum = { version = "0.7" } | ||
tokio = { workspace = true, features = ["full"] } | ||
uuid = { workspace = true, features = ["v4"] } | ||
|
@@ -22,6 +26,6 @@ tower-http = { version = "0.6", features = ["fs"] } | |
tower-sessions = "0.13" | ||
|
||
[features] | ||
default = ["wasm"] | ||
default = ["javascript"] | ||
wasm = [] | ||
javascript = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
## Axum Server | ||
# Axum Server | ||
|
||
This demonstrates using Axum as the backend. | ||
|
||
By default, it serves the WASM front-end ([located here](https://github.com/kanidm/webauthn-rs/tree/master/tutorial/wasm "located here")). | ||
This needs to be built first by running the below ([wasm-pack](https://rustwasm.github.io/wasm-pack/installer/) is required). | ||
```sh | ||
./build_wasm.sh | ||
``` | ||
By default, it serves the Javascript front-end. | ||
|
||
If you want to use the HTML/Javascript front-end instead, run the following command. | ||
```sh | ||
cargo run --no-default-features --features javascript | ||
``` | ||
If you want to use the WASM frontend instead, change the features in Cargo.toml. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters