Skip to content

Commit

Permalink
feat: implement simplify tokens (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gastón Fournier authored Feb 1, 2023
1 parent 9e99f4b commit eab0878
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 89 deletions.
124 changes: 54 additions & 70 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ homepage = "https://github.com/Unleash/unleash-edge"
[dependencies]
actix-cors = "0.6.4"
actix-middleware-etag = "0.2.0"
actix-tls = { version = "3.0.3", features = ["rustls"] }
actix-web = { version = "4.3.0", features = ["rustls"] }
actix-web-opentelemetry = { version = "0.13.0", features = ["metrics", "metrics-prometheus"] }

anyhow = "1.0.68"
awc = { version = "3.1.0", features = ["rustls"] }
chrono = { version = "0.4.23", features = ["serde"] }
Expand All @@ -31,7 +31,6 @@ serde_json = "1.0.91"
shadow-rs = "0.20.0"
tokio = { version = "1.25.0", features = ["macros", "rt-multi-thread", "tracing"] }
tracing = { version = "0.1.37", features = ["log"] }
tracing-opentelemetry = "0.18.0"
tracing-subscriber = { version = "0.3.16", features = ["json", "env-filter"] }
ulid = "1.0.0"
unleash-types = { version = "0.7.1", features = ["openapi", "hashes"] }
Expand Down
16 changes: 0 additions & 16 deletions server/src/data_sources/memory_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,6 @@ mod test {
}
}

//Yes, Clippy is correct but right now, this is test code and I don't want add a derive that's broken for prod code
#[allow(clippy::derivable_impls)]
impl Default for EdgeToken {
fn default() -> Self {
Self {
secret: Default::default(),
token_type: Default::default(),
environment: Default::default(),
projects: Default::default(),
expires_at: Default::default(),
seen_at: Default::default(),
alias: Default::default(),
}
}
}

#[test]
fn memory_provider_correctly_deduplicates_tokens() {
let mut provider = MemoryProvider::default();
Expand Down
2 changes: 2 additions & 0 deletions server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ pub mod types;
pub mod unleash_client;
pub mod urls;

pub mod tokens;

pub mod internal_backstage;
Loading

0 comments on commit eab0878

Please sign in to comment.