Class BasicClaimsSpec

java.lang.Object
com.nimbusds.openid.connect.provider.spi.grants.BasicClaimsSpec
Direct Known Subclasses:
ClaimsSpec

@Immutable public class BasicClaimsSpec extends Object
Basic OpenID claims specification.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new default basic OpenID claims specification (empty).
    BasicClaimsSpec(@Nullable Set<String> names)
    Creates a new basic OpenID claims specification.
    BasicClaimsSpec(@Nullable Set<String> names, @Nullable PresetClaims presetClaims)
    Creates a new basic OpenID claims specification.
    BasicClaimsSpec(@Nullable Set<String> names, @Nullable net.minidev.json.JSONObject data, @Nullable PresetClaims presetClaims)
    Creates a new basic OpenID claims specification.
    BasicClaimsSpec(@Nullable Set<String> names, @Nullable net.minidev.json.JSONObject presetIDTokenClaims, @Nullable net.minidev.json.JSONObject presetUserInfoClaims)
    Creates a new basic OpenID claims specification.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable net.minidev.json.JSONObject
    Returns the optional OpenID claims fulfillment data.
    Returns the names of the authorised OpenID claims.
    The additional or preset claims to be included in the ID token and UserInfo response.
    @Nullable net.minidev.json.JSONObject
    Returns the additional preset claims to be included in the ID token.
    @Nullable net.minidev.json.JSONObject
    Returns the additional preset claims to be included in the UserInfo response.
    parse(net.minidev.json.JSONObject o)
    Parses a basic OpenID claims specification from the specified JSON object.
    net.minidev.json.JSONObject
    Returns a JSON object representation of this basic claims specification.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BasicClaimsSpec

      public BasicClaimsSpec()
      Creates a new default basic OpenID claims specification (empty).
    • BasicClaimsSpec

      public BasicClaimsSpec(@Nullable Set<String> names)
      Creates a new basic OpenID claims specification.
      Parameters:
      names - The names of the authorised OpenID claims, null if none.
    • BasicClaimsSpec

      public BasicClaimsSpec(@Nullable Set<String> names, @Nullable net.minidev.json.JSONObject presetIDTokenClaims, @Nullable net.minidev.json.JSONObject presetUserInfoClaims)
      Creates a new basic OpenID claims specification.
      Parameters:
      names - The names of the authorised OpenID claims, empty set or null if none.
      presetIDTokenClaims - Additional preset claims to be included in the ID token, null if none.
      presetUserInfoClaims - Additional preset claims to be included in the UserInfo response, null if none.
    • BasicClaimsSpec

      public BasicClaimsSpec(@Nullable Set<String> names, @Nullable PresetClaims presetClaims)
      Creates a new basic OpenID claims specification.
      Parameters:
      names - The names of the authorised OpenID claims, empty set or null if none.
      presetClaims - The additional or preset claims to be included in the ID token and UserInfo response, null if none.
    • BasicClaimsSpec

      public BasicClaimsSpec(@Nullable Set<String> names, @Nullable net.minidev.json.JSONObject data, @Nullable PresetClaims presetClaims)
      Creates a new basic OpenID claims specification.
      Parameters:
      names - The names of the authorised OpenID claims, empty set or null if none.
      data - Optional OpenID claims fulfillment data, null if none.
      presetClaims - The additional or preset claims to be included in the ID token and UserInfo response, null if none.
  • Method Details

    • getNames

      public Set<String> getNames()
      Returns the names of the authorised OpenID claims.
      Returns:
      The names of the authorised OpenID claims, empty set if none.
    • getData

      public @Nullable net.minidev.json.JSONObject getData()
      Returns the optional OpenID claims fulfillment data.
      Returns:
      The OpenID claims fulfillment data, null if not specified.
    • getPresetClaims

      The additional or preset claims to be included in the ID token and UserInfo response.
      Returns:
      The additional or preset claims.
    • getPresetIDTokenClaims

      public @Nullable net.minidev.json.JSONObject getPresetIDTokenClaims()
      Returns the additional preset claims to be included in the ID token.
      Returns:
      The additional preset claims to be included in the ID token, null if none.
    • getPresetUserInfoClaims

      public @Nullable net.minidev.json.JSONObject getPresetUserInfoClaims()
      Returns the additional preset claims to be included in the UserInfo response.
      Returns:
      The additional or preset claims to be included in the UserInfo response, null if none.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Returns a JSON object representation of this basic claims specification.
      Returns:
      The JSON object.
    • parse

      public static BasicClaimsSpec parse(net.minidev.json.JSONObject o) throws com.nimbusds.oauth2.sdk.ParseException
      Parses a basic OpenID claims specification from the specified JSON object.
      Parameters:
      o - The JSON object. Must not be null.
      Returns:
      The basic OpenID claims specification.
      Throws:
      com.nimbusds.oauth2.sdk.ParseException - If parsing failed.