Package com.nimbusds.jose
Class PlainObject
java.lang.Object
com.nimbusds.jose.JOSEObject
com.nimbusds.jose.PlainObject
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PlainJWT
- Version:
- 2014-04-08
- Author:
- Vladimir Dzhuvinov
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.jose.JOSEObject
MIME_TYPE_COMPACT, MIME_TYPE_JS -
Constructor Summary
ConstructorsConstructorDescriptionPlainObject(Payload payload) Creates a new unsecured JOSE object with a defaultPlainHeaderand the specified payload.PlainObject(PlainHeader header, Payload payload) Creates a new unsecured JOSE object with the specified header and payload.PlainObject(Base64URL firstPart, Base64URL secondPart) Creates a new unsecured JOSE object with the specified Base64URL-encoded parts. -
Method Summary
Modifier and TypeMethodDescriptionReturns the header of this JOSE object.static PlainObjectParses an unsecured JOSE object from the specified string in compact format.Serialises this unsecured JOSE object to its compact format consisting of Base64URL-encoded parts delimited by period ('.') characters.Methods inherited from class com.nimbusds.jose.JOSEObject
getParsedParts, getParsedString, getPayload, setParsedParts, setPayload, split
-
Constructor Details
-
PlainObject
Creates a new unsecured JOSE object with a defaultPlainHeaderand the specified payload.- Parameters:
payload- The payload. Must not benull.
-
PlainObject
Creates a new unsecured JOSE object with the specified header and payload.- Parameters:
header- The unsecured header. Must not benull.payload- The payload. Must not benull.
-
PlainObject
Creates a new unsecured JOSE object with the specified Base64URL-encoded parts.- Parameters:
firstPart- The first part, corresponding to the unsecured header. Must not benull.secondPart- The second part, corresponding to the payload. Must not benull.- Throws:
ParseException- If parsing of the serialised parts failed.
-
-
Method Details
-
getHeader
Description copied from class:JOSEObjectReturns the header of this JOSE object.- Specified by:
getHeaderin classJOSEObject- Returns:
- The header.
-
serialize
Serialises this unsecured JOSE object to its compact format consisting of Base64URL-encoded parts delimited by period ('.') characters.[header-base64url].[payload-base64url].[]
- Specified by:
serializein classJOSEObject- Returns:
- The serialised unsecured JOSE object.
-
parse
Parses an unsecured JOSE object from the specified string in compact format.- Parameters:
s- The string to parse. Must not benull.- Returns:
- The unsecured JOSE object.
- Throws:
ParseException- If the string couldn't be parsed to a valid unsecured JOSE object.
-