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

feat: implement simplify tokens #30

Merged
merged 8 commits into from
Feb 1, 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
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