Class Claim

java.lang.Object
org.forgerock.oauth.clients.oidc.Claim
Direct Known Subclasses:
Claim

public class Claim extends Object
Models an OpenID Connect claim that has been requested in an authorize request.

See Claims in the OIDC specification.

Instances of this class are immutable.

  • Constructor Details

    • Claim

      protected Claim(String name, Locale locale, List<Object> values, boolean essential)
      The constructor.
      Parameters:
      name - the name of this Claim
      locale - the locale for this Claim
      values - the value(s) of this Claim
      essential - whether this Claim is essential
  • Method Details

    • getLocale

      public String getLocale()
      Gets the locale of this claim.

      See Claims Languages and Scripts in the OIDC specification.

      Returns:
      the locale language tag of this claim, or null if none exists
    • getJavaLocale

      public Locale getJavaLocale()
      Gets the Locale of this claim.

      See Claims Languages and Scripts in the OIDC specification.

      Returns:
      the locale of this claim, or null if none exists
    • getName

      public String getName()
      Gets the name of this claim without the locale suffix.
      Returns:
      the name of this claim
    • getNameWithLocale

      public String getNameWithLocale()
      Gets the name of this claim with the locale appended after a '#' character.
      Returns:
      the name and locale of this claim
    • getValues

      public List<Object> getValues()
      Get the value(s) of this claim.
      Returns:
      the value(s) of this claim
    • isEssential

      public boolean isEssential()
      Get whether the claim is essential.
      Returns:
      whether the claim is essential
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object