skillhub/server
Gal Eyal 8435ee1ab1 fix(auth): read device-code state via ObjectMapper conversion, not cast
The shared RedisTemplate uses GenericJackson2JsonRedisSerializer with
the application ObjectMapper, which embeds no type information, so
stored DeviceCodeData deserializes as a LinkedHashMap. The typed casts
in pollToken and authorizeDeviceCode then throw ClassCastException on
every call, making the whole device authorization flow unusable
(every poll returns 500).

Convert the raw value with ObjectMapper.convertValue instead of
casting; this reads both the current untyped map format and any typed
format, so no stored-data migration is needed. Adds bean setters to
DeviceCodeData for map conversion and regression tests that feed the
service exactly what Redis returns in production (untyped maps).

Fixes #604

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Gal Eyal <gal.e@popai.health>
2026-07-28 10:27:37 +03:00
..
.mvn docs: add Maven mirror config and troubleshooting guide for China developers (#233) 2026-04-07 09:50:07 +08:00
scripts feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00
skillhub-app fix(auth): guard SUPER_ADMIN role mutations 2026-07-01 16:23:45 +08:00
skillhub-auth fix(auth): read device-code state via ObjectMapper conversion, not cast 2026-07-28 10:27:37 +03:00
skillhub-domain feat(promotion): improve promotion review dashboard 2026-06-24 09:28:43 +08:00
skillhub-infra feat(promotion): improve promotion review dashboard 2026-06-24 09:28:43 +08:00
skillhub-notification fix(notification): keep SSE live push streams open (#524) 2026-06-16 11:57:49 +08:00
skillhub-search fix(cli): filter installable search before pagination 2026-06-17 11:35:16 +08:00
skillhub-storage fix(storage): disable chunked encoding for Aliyun OSS compatibility 2026-05-06 13:56:55 +08:00
.dockerignore feat(staging): optimize staging build with local Maven packaging 2026-03-14 14:21:06 +08:00
Dockerfile fix(storage): defer S3 bucket verification until first access (#289) 2026-04-12 15:24:09 +08:00
Dockerfile.dev fix(storage): defer S3 bucket verification until first access (#289) 2026-04-12 15:24:09 +08:00
mvnw feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
mvnw.cmd feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
pom.xml feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00