From cecf96fc29eb35de146b8056bad86ad7e680b432 Mon Sep 17 00:00:00 2001 From: Holger Veltrup Date: Wed, 30 Sep 2026 08:24:08 +0200 Subject: [PATCH] fix: annotate AuthenticationContext.providerId as @Nullable OIDC logins have no provider id, so security-core passes null and needed a NullAway suppression for it. Co-Authored-By: Claude Opus 5.5 (1M context) --- .../security/AuthenticationContext.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sitepark/ies/sharedkernel/security/AuthenticationContext.java b/src/main/java/com/sitepark/ies/sharedkernel/security/AuthenticationContext.java index bf0d406..b06f126 100644 --- a/src/main/java/com/sitepark/ies/sharedkernel/security/AuthenticationContext.java +++ b/src/main/java/com/sitepark/ies/sharedkernel/security/AuthenticationContext.java @@ -1,4 +1,15 @@ package com.sitepark.ies.sharedkernel.security; +import org.jspecify.annotations.Nullable; + +/** + * Describes how a user was authenticated. + * + * @param providerId the id of the configured provider, {@code null} if the provider type has no + * configurable instances (e.g. OIDC logins) + */ public record AuthenticationContext( - AuthProviderType providerType, String providerId, AuthMethod method, String externalId) {} + AuthProviderType providerType, + @Nullable String providerId, + AuthMethod method, + String externalId) {}