java.lang.Object
com.nimbusds.openid.connect.provider.spi.claims.ClaimUtils

public class ClaimUtils extends Object
Claim utilities.
  • Method Details

    • applyLangTags

      public static Set<String> applyLangTags(Set<String> claims, @Nullable List<com.nimbusds.langtag.LangTag> langTags)
      Applies the specified language tags to a set of claims.

      Example:

       Claims: "name", "given_name", "family_name"
       Language tags: "bg-BG", "en-US"
       Result: "name#bg-BG", "name#en-US",
               "given_name#bg-BG", "given_name#en-US",
               "family_name#bg-BG", "family_name#en-US"
       
      Parameters:
      claims - The claims to apply the language tags to. Claims that already have a language will be returned unmodified. Must not be null.
      langTags - The language tags to apply, null if not specified.
      Returns:
      The claims with applied language tags, or the original claims if no language tags are specified.