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(transport-http): JWT auth layer #1314

Merged
merged 20 commits into from
Sep 25, 2024
Merged

feat(transport-http): JWT auth layer #1314

merged 20 commits into from
Sep 25, 2024

Conversation

yash-atreya
Copy link
Member

Motivation

Post #1227, we can close #1161.

Solution

Adds a JWT layer based on hyper transport client that refreshes the bearer tokens in requests.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

crates/transport-http/Cargo.toml Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
yash-atreya and others added 2 commits September 24, 2024 17:57
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, can we add a simple provider test, just to make sure this can also be used as regular transport layer

crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last pedantic nit

crates/transport-http/src/layers/auth.rs Outdated Show resolved Hide resolved
@yash-atreya yash-atreya merged commit 6ff6a9d into main Sep 25, 2024
26 checks passed
@yash-atreya yash-atreya deleted the yash/jwt-auth-layer branch September 25, 2024 17:09
lwedge99 pushed a commit to sentioxyz/alloy that referenced this pull request Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feature] Add JWT layer for transport
2 participants