[java-oidc-common] branch dev/JCOMOIDC-139 updated: JCOMOIDC-144 - Add ui_locales parameter to the AuthenticationRequest object

Phil Smart philip.smart at jisc.ac.uk
Wed Oct 15 13:24:18 UTC 2025


This is an automated email from the git hooks/post-receive script.

philsmart pushed a commit to branch dev/JCOMOIDC-139
in repository java-oidc-common.

View the commit online:
http://git.shibboleth.net/view/?p=java-oidc-common.git;a=commit;h=6ebda135ea388e17d7313ef7f40fef4b7645a039

The following commit(s) were added to refs/heads/dev/JCOMOIDC-139 by this push:
     new 6ebda13  JCOMOIDC-144 - Add ui_locales parameter to the AuthenticationRequest object
6ebda13 is described below

commit 6ebda135ea388e17d7313ef7f40fef4b7645a039
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 afc4d77..5de7d97 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