Class IDTokenSpec

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static IDTokenSpec NONE
      None (no issue) ID token specification.
    • Constructor Summary

      Constructors 
      Constructor Description
      IDTokenSpec()
      Creates a new default ID token specification (no issue).
      IDTokenSpec​(boolean issue, long lifetime, @Nullable com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
      Creates a new ID token specification.
      IDTokenSpec​(boolean issue, long lifetime, @Nullable Date authTime, @Nullable com.nimbusds.openid.connect.sdk.claims.ACR acr, @Nullable List<com.nimbusds.openid.connect.sdk.claims.AMR> amrList, @Nullable com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
      Creates a new ID token specification.
    • Field Detail

      • NONE

        public static final IDTokenSpec NONE
        None (no issue) ID token specification.
    • Constructor Detail

      • IDTokenSpec

        public IDTokenSpec()
        Creates a new default ID token specification (no issue).
      • IDTokenSpec

        public IDTokenSpec​(boolean issue,
                           long lifetime,
                           @Nullable com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
        Creates a new ID token specification.
        Parameters:
        issue - Controls the ID token issue. If true an ID token must be issued, false to prohibit issue.
        lifetime - The ID token lifetime, in seconds, zero if not specified (to let the Connect2id server apply the default configured lifetime for ID tokens).
        impersonatedSubject - The subject in impersonation and delegation cases, null if not applicable.
      • IDTokenSpec

        public IDTokenSpec​(boolean issue,
                           long lifetime,
                           @Nullable Date authTime,
                           @Nullable com.nimbusds.openid.connect.sdk.claims.ACR acr,
                           @Nullable List<com.nimbusds.openid.connect.sdk.claims.AMR> amrList,
                           @Nullable com.nimbusds.oauth2.sdk.id.Subject impersonatedSubject)
        Creates a new ID token specification.
        Parameters:
        issue - Controls the ID token issue. If true an ID token must be issued, false to prohibit issue.
        lifetime - The ID token lifetime, in seconds, zero if not specified (to let the Connect2id server apply the default configured lifetime for ID tokens).
        authTime - The time of the subject authentication. If null it will be set to now. Applies only if an ID token is issued.
        acr - The Authentication Context Class Reference (ACR), null if not specified. Applies only if an ID token is issued.
        amrList - The Authentication Methods Reference (AMR) list, null if not specified. Applies only if an ID token is issued.
        impersonatedSubject - The subject in impersonation and delegation cases, null if not applicable.
    • Method Detail

      • getAuthTime

        public @Nullable Date getAuthTime()
        Returns the time of the subject authentication.
        Returns:
        The time of the subject authentication. If null it will be set to now. Applies only if an ID token is issued.
      • getACR

        public @Nullable com.nimbusds.openid.connect.sdk.claims.ACR getACR()
        Returns the Authentication Context Class Reference (ACR).
        Returns:
        The Authentication Context Class Reference (ACR), null if not specified. Applies only if an ID token is issued.
      • getAMRList

        public @Nullable List<com.nimbusds.openid.connect.sdk.claims.AMR> getAMRList()
        Returns The Authentication Methods Reference (AMR) list.
        Returns:
        The Authentication Methods Reference (AMR) list, null if not specified. Applies only if an ID token is issued.
      • toJSONObject

        public net.minidev.json.JSONObject toJSONObject()
        Description copied from class: TokenSpec
        Returns a JSON object representation of this token specification.
        Overrides:
        toJSONObject in class OptionalTokenSpec
        Returns:
        The JSON object.
      • parse

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