Package org.forgerock.openidconnect
Class OpenIdConnectToken
- java.lang.Object
-
- org.forgerock.json.JsonValue
-
- org.forgerock.openidconnect.OpenIdConnectToken
-
-
Constructor Summary
Constructors Constructor Description OpenIdConnectToken(String signingKeyId, String encryptionKeyId, byte[] clientSecret, KeyPair signingKeyPair, Key encryptionKey, String signingAlgorithm, String encryptionAlgorithm, String encryptionMethod, boolean isIDTokenEncryptionEnabled, String iss, String sub, String aud, String azp, long exp, long iat, long authTime, String nonce, String ops, String atHash, String cHash, String acr, List<String> amr, String auditTrackingId, String realm)Constructs a new OpenIdConnectToken.OpenIdConnectToken(org.forgerock.json.jose.jwt.JwtClaimsSet claims)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuditTrackingId()Get the audit tracking ID for this token.AuditConstants.TrackingIdKeygetAuditTrackingIdKey()Get the audit tracking ID key for this token.StringgetTokenId()Gets the token's identifier.Map<String,Object>getTokenInfo()Gets the token's information.StringgetTokenName()Gets the token's name.protected voidsetClaims(org.forgerock.json.jose.jwt.JwtClaimsSet claims, String... keys)org.forgerock.json.JsonValuetoJsonValue()Gets theJsonValuerepresentation of the token.Map<String,Object>toMap()Converts the token into aMapof its key data.-
Methods inherited from class org.forgerock.json.JsonValue
add, add, add, add, addPermissive, array, as, asBigDecimal, asBoolean, asCollection, asCollection, asDouble, asEnum, asInteger, asList, asList, asLong, asMap, asMap, asMapOfList, asNumber, asSet, asSet, asString, asURI, clear, clone, contains, copy, defaultTo, diff, expect, field, fieldIfNotNull, get, get, get, getObject, getPointer, isBoolean, isCollection, isDefined, isEqualTo, isList, isMap, isNotNull, isNull, isNumber, isSet, isString, iterator, json, keys, object, object, patch, put, put, put, putPermissive, remove, remove, remove, required, set, setObject, size, toIndex, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
OpenIdConnectToken
public OpenIdConnectToken(String signingKeyId, String encryptionKeyId, byte[] clientSecret, KeyPair signingKeyPair, Key encryptionKey, String signingAlgorithm, String encryptionAlgorithm, String encryptionMethod, boolean isIDTokenEncryptionEnabled, String iss, String sub, String aud, String azp, long exp, long iat, long authTime, String nonce, String ops, String atHash, String cHash, String acr, List<String> amr, String auditTrackingId, String realm)
Constructs a new OpenIdConnectToken.- Parameters:
signingKeyId- The signing key id.encryptionKeyId- The encryption key id.clientSecret- The client's secret.signingKeyPair- The token's signing key pair.encryptionKey- The token's encryption key.signingAlgorithm- The signing algorithm.encryptionAlgorithm- The encryption algorithm.encryptionMethod- The encryption method.isIDTokenEncryptionEnabled-trueIf ID token encryption is enabled.iss- The issuer.sub- The subject.aud- The audience.azp- The authorized party.exp- The expiry time.iat- The issued at time.authTime- The authenticated time.nonce- The nonce.ops- The ops.atHash- The at_hash.cHash- The c_hash.acr- The acr.amr- The amr.auditTrackingId- The audit tracking ID.realm- The realm.
-
OpenIdConnectToken
public OpenIdConnectToken(org.forgerock.json.jose.jwt.JwtClaimsSet claims)
-
-
Method Detail
-
setClaims
protected void setClaims(org.forgerock.json.jose.jwt.JwtClaimsSet claims, String... keys)
-
getTokenId
public String getTokenId() throws ServerException
Gets the token's identifier.- Specified by:
getTokenIdin interfaceToken- Returns:
- The token's id.
- Throws:
ServerException- If any internal server error occurs.
-
getTokenName
public String getTokenName()
Gets the token's name.- Specified by:
getTokenNamein interfaceToken- Returns:
- The token's name.
-
toMap
public Map<String,Object> toMap() throws ServerException
Converts the token into aMapof its key data.- Specified by:
toMapin interfaceToken- Returns:
- A
Mapof the token's key data. - Throws:
ServerException- If any internal server error occurs.
-
getTokenInfo
public Map<String,Object> getTokenInfo()
Gets the token's information.- Specified by:
getTokenInfoin interfaceToken- Returns:
- A
Mapof the token's information.
-
toJsonValue
public org.forgerock.json.JsonValue toJsonValue()
Gets theJsonValuerepresentation of the token.- Specified by:
toJsonValuein interfaceToken- Returns:
- The
JsonValuerepresentation of the token.
-
getAuditTrackingId
public String getAuditTrackingId()
Description copied from interface:TokenGet the audit tracking ID for this token.- Specified by:
getAuditTrackingIdin interfaceToken- Returns:
- The tracking ID.
-
getAuditTrackingIdKey
public AuditConstants.TrackingIdKey getAuditTrackingIdKey()
Description copied from interface:TokenGet the audit tracking ID key for this token.- Specified by:
getAuditTrackingIdKeyin interfaceToken- Returns:
- The tracking ID key.
-
-