Class LogoutTokenClaimsSet
java.lang.Object
com.nimbusds.openid.connect.sdk.claims.ClaimsSet
com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
com.nimbusds.openid.connect.sdk.claims.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, "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, section 2.4 (draft 07).
- Security Event Token (SET) (RFC 8417).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The OpenID logout event type.static final String
The events claim name.static final String
The JWT ID claim name.static final String
The session identifier claim name.Fields inherited from class com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
IAT_CLAIM_NAME, SUB_CLAIM_NAME
Fields inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
AUD_CLAIM_NAME, claims, ISS_CLAIM_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionLogoutTokenClaimsSet
(com.nimbusds.jwt.JWTClaimsSet jwtClaimsSet) Creates a new logout token claims set from the specified JSON Web Token (JWT) claims set.LogoutTokenClaimsSet
(Issuer iss, Subject sub, List<Audience> aud, Date iat, JWTID jti, SessionID sid) Creates a new logout token claims set. -
Method Summary
Modifier and TypeMethodDescriptiongetJWTID()
Gets the JWT ID.Gets the session ID.Gets the names of the standard top-level logout token claims.static LogoutTokenClaimsSet
Parses a logout token claims set from the specified JSON object string.void
setSessionID
(SessionID sid) Sets the session ID.net.minidev.json.JSONObject
Gets the JSON object representation of this claims set.com.nimbusds.jwt.JWTClaimsSet
Gets the JSON Web Token (JWT) claims set for this claim set.Methods inherited from class com.nimbusds.openid.connect.sdk.claims.CommonClaimsSet
getIssueTime, getSubject
Methods inherited from class com.nimbusds.openid.connect.sdk.claims.ClaimsSet
equals, getAudience, getBooleanClaim, getClaim, getClaim, getDateClaim, getIssuer, getJSONArrayClaim, getJSONObjectClaim, getLangTaggedClaim, getNumberClaim, getStringClaim, getStringClaim, getStringListClaim, getURIClaim, getURLClaim, hashCode, putAll, putAll, setAudience, setAudience, setClaim, setClaim, setDateClaim, setIssuer, setURIClaim, setURLClaim, toJSONString, toString
-
Field Details
-
JTI_CLAIM_NAME
The JWT ID claim name.- See Also:
-
EVENTS_CLAIM_NAME
The events claim name.- See Also:
-
EVENT_TYPE
The OpenID logout event type.- See Also:
-
SID_CLAIM_NAME
The session identifier claim name.- See Also:
-
-
Constructor Details
-
LogoutTokenClaimsSet
public LogoutTokenClaimsSet(Issuer iss, Subject sub, List<Audience> aud, Date iat, 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 benull
.sub
- The subject. Must not benull
unless the session ID is set.aud
- The audience. Must not benull
.iat
- The issue time. Must not benull
.jti
- The JWT ID. Must not benull
.sid
- The session ID. Must not benull
unless the subject is set.
-
LogoutTokenClaimsSet
Creates a new logout token claims set from the specified JSON Web Token (JWT) claims set.- Parameters:
jwtClaimsSet
- The JWT claims set. Must not benull
.- Throws:
ParseException
- If the JWT claims set doesn't represent a valid logout token claims set.
-
-
Method Details
-
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
Gets the JWT ID. Corresponds to thejti
claim.- Returns:
- The JWT ID.
-
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 classClaimsSet
- Returns:
- The JSON object representation.
-
toJWTClaimsSet
Description copied from class:ClaimsSet
Gets the JSON Web Token (JWT) claims set for this claim set.- Overrides:
toJWTClaimsSet
in classClaimsSet
- Returns:
- The JWT claims set.
- Throws:
ParseException
- If the conversion to a JWT claims set fails.
-
parse
Parses a logout token claims set from the specified JSON object string.- Parameters:
json
- The JSON object string to parse. Must not benull
.- Returns:
- The logout token claims set.
- Throws:
ParseException
- If parsing failed.
-
getSessionID
Gets the session ID. Corresponds to thesid
claim.- Returns:
- The session ID,
null
if not specified.
-
setSessionID
Sets the session ID. Corresponds to thesid
claim.- Parameters:
sid
- The session ID,null
if not specified.
-