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

[REQ] Rust: Add OAuth/JWT-header and allow configuration to be plugged in #18599

Open
cvkem opened this issue May 7, 2024 · 0 comments
Open

Comments

@cvkem
Copy link

cvkem commented May 7, 2024

In Rust Oauth/JWT is not fully support

Currently the Rust-server (and client) code based on Hyper does not fully support oAuth/JWT. If you want to have a working solution you need to supplement the generated code with JWT-parsing to validate and extract the authentication data. The current server and client do not support this, and thus the example program does not show you how to configure this.

Allow the Oauth/JWT code be injected in the generated code

Instrument the generated server and client code such that the Authentication headers are correctly set based on the provided Bearer token (JWT). This requires changes to the generated server and client code. The actual oAuth/JWT parsing need to be injected (Inversion of Control) as the code generated can not (and should) not hold the details of how the JWT tokens need to be properly validated and parsed.

Describe alternatives you've considered

I have generated a working solution by amending the generated code such that the oAuth/JWT parser can be provided via injection from the sample code. This solution extends/amends the current code and example code to inject the token-generator in the client and the token parser/validator in de server.

Next step is to amend the Mustache templates for the rust-server (and client) and to generate a pull-request for it.
Is there a specific template maintainer that I should tag on such a pull-request,

@cvkem cvkem changed the title [REQ] Rust: Add OAuth/JWT-header and allow configuration via pluged in via IoC (= Inversion of Control) [REQ] Rust: Add OAuth/JWT-header and allow configuration to be plugged in May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant