Skip to content

fix: clippy warnings#103

Merged
JanZachmann merged 5 commits intoomnect:mainfrom
JanZachmann:fix/jwt-audience-validation
Feb 18, 2026
Merged

fix: clippy warnings#103
JanZachmann merged 5 commits intoomnect:mainfrom
JanZachmann:fix/jwt-audience-validation

Conversation

@JanZachmann
Copy link
Contributor

@JanZachmann JanZachmann commented Feb 18, 2026

Summary

  • Fixes clippy warnings

jsonwebtoken v9 Validation::new() enforces audience (aud) validation
by default. Keycloak tokens set aud to the OIDC client ID, which the
backend does not know. The previous jwt-simple library did not enforce
audience. Disable aud validation to match the prior behavior.

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
When the session cookie is invalid (e.g. after password change via
session.purge()), the auth middleware takes the request payload to
extract the Authorization header but never restores it. This causes
all authenticated POST requests with a body to fail with
"Json deserialize error: EOF while parsing a value at line 1 column 0".

Restore the payload via req.set_payload() after successful Bearer or
Basic auth. Also refactors the auth branches into a single match to
prevent future omissions.

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
…lidation

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
@JanZachmann JanZachmann merged commit 3d85736 into omnect:main Feb 18, 2026
4 checks passed
@JanZachmann JanZachmann changed the title fix(auth): disable audience validation and restore request payload fix: clippy warnings Feb 18, 2026
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

Successfully merging this pull request may close these issues.

1 participant

Comments