@ThreadSafe public class EncryptedJWT extends JWEObject implements JWT
JWEObject.StateMIME_TYPE_COMPACT, MIME_TYPE_JS| Constructor and Description |
|---|
EncryptedJWT(Base64URL firstPart,
Base64URL secondPart,
Base64URL thirdPart,
Base64URL fourthPart,
Base64URL fifthPart)
Creates a new encrypted JSON Web Token (JWT) with the specified
serialised parts.
|
EncryptedJWT(JWEHeader header,
ReadOnlyJWTClaimsSet claimsSet)
Creates a new to-be-encrypted JSON Web Token (JWT) with the specified
header and claims set.
|
| Modifier and Type | Method and Description |
|---|---|
ReadOnlyJWTClaimsSet |
getJWTClaimsSet()
Gets the claims set of the JSON Web Token (JWT).
|
static EncryptedJWT |
parse(java.lang.String s)
Parses an encrypted JSON Web Token (JWT) from the specified string in
compact format.
|
decrypt, encrypt, getAuthenticationTag, getCipherText, getEncryptedKey, getHeader, getInitializationVector, getIntegrityValue, getState, serializegetParsedParts, getParsedString, getPayload, setParsedParts, setPayload, splitclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHeader, getParsedParts, getParsedString, serializepublic EncryptedJWT(JWEHeader header, ReadOnlyJWTClaimsSet claimsSet)
unencrypted.header - The JWE header. Must not be null.claimsSet - The JWT claims set. Must not be null.public EncryptedJWT(Base64URL firstPart, Base64URL secondPart, Base64URL thirdPart, Base64URL fourthPart, Base64URL fifthPart) throws java.text.ParseException
encrypted.firstPart - The first part, corresponding to the JWE header.
Must not be null.secondPart - The second part, corresponding to the encrypted
key. Empty or null if none.thirdPart - The third part, corresponding to the initialisation
vectory. Empty or null if none.fourthPart - The fourth part, corresponding to the cipher text.
Must not be null.fifthPart - The fifth part, corresponding to the integrity
value. Empty of null if none.java.text.ParseException - If parsing of the serialised parts failed.public ReadOnlyJWTClaimsSet getJWTClaimsSet() throws java.text.ParseException
JWTgetJWTClaimsSet in interface JWTnull if not available (for an
encrypted JWT that isn't decrypted).java.text.ParseException - If the payload of the JWT doesn't represent a
valid JSON object and a JWT claims set.public static EncryptedJWT parse(java.lang.String s) throws java.text.ParseException
s - The string to parse. Must not be null.java.text.ParseException - If the string couldn't be parsed to a valid
encrypted JWT.Copyright © 2014 Connect2id Ltd.. All Rights Reserved.