com.nimbusds.jwt
Interface JWT

All Known Implementing Classes:
EncryptedJWT, PlainJWT, SignedJWT

public interface JWT

JSON Web Token (JWT) interface.

Version:
$version$ (2013-01-15)
Author:
Vladimir Dzhuvinov

Method Summary
 ReadOnlyHeader getHeader()
          Gets the JOSE header of the JSON Web Token (JWT).
 ReadOnlyJWTClaimsSet getJWTClaimsSet()
          Gets the claims set of the JSON Web Token (JWT).
 Base64URL[] getParsedParts()
          Gets the original parsed Base64URL parts used to create the JSON Web Token (JWT).
 String getParsedString()
          Gets the original parsed string used to create the JSON Web Token (JWT).
 String serialize()
          Serialises the JSON Web Token (JWT) to its compact format consisting of Base64URL-encoded parts delimited by period ('.') characters.
 

Method Detail

getHeader

ReadOnlyHeader getHeader()
Gets the JOSE header of the JSON Web Token (JWT).

Returns:
The header.

getJWTClaimsSet

ReadOnlyJWTClaimsSet getJWTClaimsSet()
                                     throws ParseException
Gets the claims set of the JSON Web Token (JWT).

Returns:
The claims set, null if not available (for an encrypted JWT that isn't decrypted).
Throws:
ParseException - If the payload of the JWT doesn't represent a valid JSON object and a JWT claims set.

getParsedParts

Base64URL[] getParsedParts()
Gets the original parsed Base64URL parts used to create the JSON Web Token (JWT).

Returns:
The original Base64URL parts used to creates the JWT, null if the JWT was created from scratch. The individual parts may be empty or null to indicate a missing part.

getParsedString

String getParsedString()
Gets the original parsed string used to create the JSON Web Token (JWT).

Returns:
The parsed string used to create the JWT, null if the JWT was created from scratch.
See Also:
getParsedParts()

serialize

String serialize()
Serialises the JSON Web Token (JWT) to its compact format consisting of Base64URL-encoded parts delimited by period ('.') characters.

Returns:
The serialised JWT.
Throws:
IllegalStateException - If the JWT is not in a state that permits serialisation.


Copyright © 2013 NimbusDS. All Rights Reserved.