Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

[databroker] Update dependencies to support RISC-V #694

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
64 changes: 14 additions & 50 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion kuksa_databroker/databroker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clap = { workspace = true, features = [
sqlparser = "0.16.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
jsonwebtoken = "8.2.0"
jsonwebtoken = "9.1.0"
regex = "1.7.1"

jemallocator = { version = "0.5.0", optional = true }
Expand Down
10 changes: 5 additions & 5 deletions kuksa_databroker/databroker/src/authorization/jwt/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ impl Decoder {
}
};

let validator = Validation::new(Algorithm::RS256);
// validator.leeway = 5;
// validator.set_audience(..);
// validator.set_issuer(..);
// TODO: Make algorithm configurable.
let mut validator = Validation::new(Algorithm::RS256);
// TODO: Make "aud" configurable.
validator.set_audience(&["kuksa.val"]);

Ok(Decoder {
decoding_key,
Expand Down Expand Up @@ -168,7 +168,7 @@ AEiqOjPq0D6X45wCzIwjILUCAwEAAQ==
Ok(claims) => {
assert_eq!(claims.scope, "read:Vehicle.Speed");
}
Err(_) => panic!("decode should succeed"),
Err(err) => panic!("decode should succeed but failed with:{}", err),
}
}
}