Comments (2)
Yep, I've got a fork with the update, so I will post it and we'll see when the maintainer can get it merged.
Also for the state, you can simply add it to a struct
#[derive(Clone)]
pub struct SharedApp(Arc<App>);
impl Deref for SharedApp {
type Target = Arc<App>;
fn deref(&self) -> &Self::Target {
&self.0
}
}
pub struct App {
pub is: IntrospectionState,
// Add your own state here
}
impl App {
pub fn to_shared(self) -> SharedApp {
SharedApp(Arc::new(self))
}
}
impl FromRef<SharedApp> for IntrospectionState {
fn from_ref(input: &SharedApp) -> Self {
input.is.clone()
}
}
// ... Se example
let is = IntrospectionStateBuilder::new("https://zitadel-libraries-l8boqa.zitadel.cloud")
.with_basic_auth(
// ... skipped for brevity
)
.build()
.await
.unwrap();
let state = App {
is
// ... Add your other state
}.to_shared()
let app = Router::new()
.route("/unauthed", get(unauthed))
.route("/authed", get(authed))
.with_state(state);
Something along those lines.
Btw this is the recommended pattern from upstream as well
from zitadel-rust.
🎉 This issue has been resolved in version 3.5.0 🎉
The release is available on:
v3.5.0
- GitHub release
Your semantic-release bot 📦🚀
from zitadel-rust.
Related Issues (12)
- The automated release is failing 🚨 HOT 1
- Try to create a fix or feat commit when zitadel repo updates HOT 1
- Undocumented protobuf dependency HOT 2
- How to set request headers in management client HOT 3
- Support for Additional Claims in Introspection HOT 2
- Credentials and Reqwest SSL Implementation(s) HOT 1
- RUSTSEC-2020-0159: Potential segfault in `localtime_r` invocations HOT 1
- Actix support? HOT 4
- RUSTSEC-2023-0071: Marvin Attack: potential key recovery through timing sidechannels
- RUSTSEC-2020-0071: Potential segfault in the time crate HOT 1
- Add interceptor that updates the service account key after it expires HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zitadel-rust.