[java-oidc-common] 06/20: JCOMOIDC-144 - Add ui_locales parameter to the AuthenticationRequest object
Codeberg
noreply at shibboleth.net
Tue Feb 17 20:14:41 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch dev/JCOMOIDC-139
in repository java-oidc-common.
View the commit online:
https://codeberg.org/Shibboleth/java-oidc-common/commit/cdd5c8bbed6f0c54917076776e106f8702e77059
commit cdd5c8bbed6f0c54917076776e106f8702e77059
Author: Phil Smart <philip.smart at jisc.ac.uk>
AuthorDate: Wed Oct 15 14:24:16 2025 +0100
JCOMOIDC-144 - Add ui_locales parameter to the AuthenticationRequest
object
- Add ui_locales
https://shibboleth.atlassian.net/browse/JCOMOIDC-144
---
.../profile/core/OIDCAuthenticationRequest.java | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/core/OIDCAuthenticationRequest.java b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/core/OIDCAuthenticationRequest.java
index afc4d777..5de7d971 100644
--- a/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/core/OIDCAuthenticationRequest.java
+++ b/oidc-common-profile-api/src/main/java/net/shibboleth/oidc/profile/core/OIDCAuthenticationRequest.java
@@ -18,11 +18,14 @@ import java.net.URI;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.nimbusds.jwt.JWT;
+import com.nimbusds.langtag.LangTag;
import com.nimbusds.oauth2.sdk.id.ClientID;
import com.nimbusds.openid.connect.sdk.Display;
import com.nimbusds.openid.connect.sdk.Nonce;
@@ -100,6 +103,9 @@ public class OIDCAuthenticationRequest extends OAuthAuthorizationRequest {
/** The list of resource indicators.*/
@Nonnull @NotLive private List<URI> resources;
+
+ /** End-User's preferred languages and scripts for the user interface. */
+ @Nonnull @NotLive private List<LangTag> uiLocales;
/**
*
@@ -113,6 +119,7 @@ public class OIDCAuthenticationRequest extends OAuthAuthorizationRequest {
getScope().add(DEFAULT_OPENID_SCOPE);
acrs = CollectionSupport.emptyList();
resources = CollectionSupport.emptyList();
+ uiLocales = CollectionSupport.emptyList();
}
/**
@@ -383,6 +390,29 @@ public class OIDCAuthenticationRequest extends OAuthAuthorizationRequest {
return CollectionSupport.copyToList(resources);
}
+ /**
+ * Set the list of optional ui_locales that specifies the End-User's preferred languages and scripts for the
+ * user interface.
+ *
+ * @param locales The uiLocales to set.
+ */
+ public void setUiLocales(@Nullable @NonnullElements final List<LangTag> locales) {
+ if (locales != null) {
+ uiLocales = locales.stream().filter(Objects::nonNull)
+ .collect(CollectionSupport.nonnullCollector(Collectors.toUnmodifiableList())).get();
+ }
+ }
+
+ /**
+ * Get the list of optional ui_locales that specifies the End-User's preferred languages and scripts for the
+ * user interface.
+ *
+ * @return the uiLocales.
+ */
+ @Nonnull @NotLive @Unmodifiable public List<LangTag> getUiLocales() {
+ return CollectionSupport.copyToList(uiLocales);
+ }
+
//TODO others relating to sections 5.2, 5.5, 6, and 7.2.1
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list