Class LogoutTokenClaimsSet

All Implemented Interfaces:
net.minidev.json.JSONAware

Back-channel logout token claims set, serialisable to a JSON object.

Example logout token claims set:

 {
   "iss"    : "https://server.example.com",
   "sub"    : "248289761001",
   "aud"    : "s6BhdRkqt3",
   "iat"    : 1471566154,
   "exp"    : 1471569754,
   "jti"    : "bWJq",
   "sid"    : "08a5019c-17e1-4977-8f42-65a12843ea02",
   "events" : { "http://schemas.openid.net/event/backchannel-logout": { } }
 }
 

Related specifications:

  • OpenID Connect Back-Channel Logout 1.0
  • Security Event Token (SET) (RFC 8417)
  • Field Details

  • Constructor Details

    • LogoutTokenClaimsSet

      public LogoutTokenClaimsSet(Issuer iss, Subject sub, List<Audience> aud, Date iat, Date exp, JWTID jti, SessionID sid)
      Creates a new logout token claims set. Either the subject or the session ID must be set, or both.
      Parameters:
      iss - The issuer. Must not be null.
      sub - The subject. Must not be null unless the session ID is set.
      aud - The audience. Must not be null.
      iat - The issue time. Must not be null.
      exp - The expiration time. Must not be null.
      jti - The JWT ID. Must not be null.
      sid - The session ID. Must not be null unless the subject is set.
    • LogoutTokenClaimsSet

      @Deprecated public LogoutTokenClaimsSet(Issuer iss, Subject sub, List<Audience> aud, Date iat, JWTID jti, SessionID sid)
      Deprecated.
      Creates a new logout token claims set. Either the subject or the session ID must be set, or both.
      Parameters:
      iss - The issuer. Must not be null.
      sub - The subject. Must not be null unless the session ID is set.
      aud - The audience. Must not be null.
      iat - The issue time. Must not be null.
      jti - The JWT ID. Must not be null.
      sid - The session ID. Must not be null unless the subject is set.
    • LogoutTokenClaimsSet

      public LogoutTokenClaimsSet(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) throws ParseException
      Creates a new logout token claims set from the specified JSON Web Token (JWT) claims set.
      Parameters:
      jwtClaimsSet - The JWT claims set. Must not be null.
      Throws:
      ParseException - If the JWT claims set doesn't represent a valid logout token claims set.
  • Method Details

    • getStandardClaimNames

      public static Set<String> getStandardClaimNames()
      Gets the names of the standard top-level logout token claims.
      Returns:
      The names of the standard top-level logout token claims (read-only set).
    • getJWTID

      public JWTID getJWTID()
      Gets the JWT ID. Corresponds to the jti claim.
      Returns:
      The JWT ID.
    • toJSONObject

      public net.minidev.json.JSONObject toJSONObject()
      Description copied from class: ClaimsSet
      Gets the JSON object representation of this claims set.

      Example:

       {
         "country"       : "USA",
         "country#en"    : "USA",
         "country#de_DE" : "Vereinigte Staaten",
         "country#fr_FR" : "Etats Unis"
       }
       
      Overrides:
      toJSONObject in class ClaimsSet
      Returns:
      The JSON object representation.
    • toJWTClaimsSet

      public com.nimbusds.jwt.JWTClaimsSet toJWTClaimsSet() throws ParseException
      Description copied from class: ClaimsSet
      Gets the JSON Web Token (JWT) claims set for this claim set.
      Overrides:
      toJWTClaimsSet in class ClaimsSet
      Returns:
      The JWT claims set.
      Throws:
      ParseException - If the conversion to a JWT claims set fails.
    • parse

      public static LogoutTokenClaimsSet parse(String json) throws ParseException
      Parses a logout token claims set from the specified JSON object string.
      Parameters:
      json - The JSON object string to parse. Must not be null.
      Returns:
      The logout token claims set.
      Throws:
      ParseException - If parsing failed.
    • getExpirationTime

      public Date getExpirationTime()
      Gets the token expiration time. Corresponds to the exp claim.
      Returns:
      The expiration time.
    • getSessionID

      public SessionID getSessionID()
      Gets the session ID. Corresponds to the sid claim.
      Returns:
      The session ID, null if not specified.
    • setSessionID

      public void setSessionID(SessionID sid)
      Sets the session ID. Corresponds to the sid claim.
      Parameters:
      sid - The session ID, null if not specified.