Class ClaimsSpec

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ClaimsSpec NONE
      None (empty) claims specification.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClaimsSpec()
      Creates a new default OpenID claims specification (empty).
      ClaimsSpec​(@Nullable Set<String> names)
      Creates a new OpenID claims specification.
      ClaimsSpec​(@Nullable Set<String> names, @Nullable List<com.nimbusds.langtag.LangTag> locales, @Nullable net.minidev.json.JSONObject data, @Nullable net.minidev.json.JSONObject presetIDTokenClaims, @Nullable net.minidev.json.JSONObject presetUserInfoClaims, com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
      Creates a new OpenID claims specification.
      ClaimsSpec​(@Nullable Set<String> names, @Nullable List<com.nimbusds.langtag.LangTag> locales, @Nullable net.minidev.json.JSONObject presetIDTokenClaims, @Nullable net.minidev.json.JSONObject presetUserInfoClaims, com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
      Creates a new OpenID claims specification.
    • Field Detail

      • NONE

        public static final ClaimsSpec NONE
        None (empty) claims specification.
    • Constructor Detail

      • ClaimsSpec

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

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

        public ClaimsSpec​(@Nullable Set<String> names,
                          @Nullable List<com.nimbusds.langtag.LangTag> locales,
                          @Nullable net.minidev.json.JSONObject presetIDTokenClaims,
                          @Nullable net.minidev.json.JSONObject presetUserInfoClaims,
                          com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
        Creates a new OpenID claims specification.
        Parameters:
        names - The names of the authorised OpenID claims, null if none. The preferred claims locales, null if not specified.
        presetIDTokenClaims - Additional or preset claims to be included in the ID token, null if none.
        presetUserInfoClaims - Additional or preset claims to be included in the UserInfo response, null if none.
        transport - The preferred claims transport. Must not be null.
      • ClaimsSpec

        public ClaimsSpec​(@Nullable Set<String> names,
                          @Nullable List<com.nimbusds.langtag.LangTag> locales,
                          @Nullable net.minidev.json.JSONObject data,
                          @Nullable net.minidev.json.JSONObject presetIDTokenClaims,
                          @Nullable net.minidev.json.JSONObject presetUserInfoClaims,
                          com.nimbusds.openid.connect.sdk.claims.ClaimsTransport transport)
        Creates a new OpenID claims specification.
        Parameters:
        names - The names of the authorised OpenID claims, null if none.
        locales - The preferred claims locales,
        data - Optional claims fulfillment data, null if not specified.
        presetIDTokenClaims - Additional or preset claims to be included in the ID token, null if none.
        presetUserInfoClaims - Additional or preset claims to be included in the UserInfo response, null if none.
        transport - The preferred claims transport. Must not be null.
    • Method Detail

      • getLocales

        public @Nullable List<com.nimbusds.langtag.LangTag> getLocales()
        Returns the preferred OpenID claims locales.
        Returns:
        The preferred OpenID claims locales, null if not specified.
      • getTransport

        public com.nimbusds.openid.connect.sdk.claims.ClaimsTransport getTransport()
        Returns the preferred claims transport.
        Returns:
        The preferred claims transport.
      • toJSONObject

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

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