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

Check JWT before deserializing request #28

Open
michaelsproul opened this issue Sep 27, 2023 · 0 comments
Open

Check JWT before deserializing request #28

michaelsproul opened this issue Sep 27, 2023 · 0 comments

Comments

@michaelsproul
Copy link
Member

Eleel allows quite large amounts of data to be uploaded. We should check that the JWT token is verified before deserializing this data as JSON. Presently we're just using Axum's handler to get access to both the header and the JSON body, meaning we check the token after deserialization:

eleel/src/main.rs

Lines 100 to 104 in 10e4ff2

async fn handle_client_json_rpc(
State(state): State<Arc<AppState>>,
TypedHeader(jwt_token_str): TypedHeader<Authorization<Bearer>>,
maybe_requests: Result<Json<Requests>, JsonRejection>,
) -> Json<Responses> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant