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
Head over and check out the Delphi JOSE and JWT Library!
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
Hello Muminjon. Grat library, thanks for sharing! Do you know approximately when this library will support JWE?
Hi Carlos, thanks for the kind comments. I’m answering on behalf of Embarcadero – the library is maintained by Paulo Rossi. In the ToDo he mentions JWE as a potential future work item: https://github.com/paolo-rossi/delphi-jose-jwt#wrench-todo. You could raise a ticket with the repo and one of the maintainers might be able to give you an answer: https://github.com/paolo-rossi/delphi-jose-jwt/issues.