Delphi implementation of JWT (JSON Web Token) and the JOSE (JSON Object Signing and Encryption) specification suite. This library supports the JWS (JWE support is planned) compact serializations with several JOSE algorithms.
What is JOSE
JOSE is a standard that provides a general approach to signing and encryption of any content. JOSE consists of several RFC:
- JWT (JSON Web Token) – describes the representation of claims encoded in JSON
- JWS (JSON Web Signature) – describes producing and handling signed messages
- JWE (JSON Web Encryption) – describes producing and handling encrypted messages
- JWA (JSON Web Algorithms) – describes cryptographic algorithms used in JOSE
- JWK (JSON Web Key) – describes format and handling of cryptographic keys in JOSE
General Features
Token serialization
- One method call to serialize a token
Token deserialization
- One method call to validate and deserialize a compact token
Claims validation
exp
,iat
,nbf
,aud
,iss
,sub
claims validatation: supported- Easy to use
TJOSEConsumer
andTJOSEConsumerBuilder
classes to validate token with a fine granularity - Easy to write custom validators!
Signing algorithms
NONE algorithm
: supported (but discouraged)HS256
,HS384
,HS512 algorithms
: supportedRS256
,RS384
,RS512 algorithms
: supported (thanks to SirAlex)ES256
,ES384
,ES512
algorithms – not (yet) supported