A fork of JSON Web Token to be used as a dependency in ba-st for GS/64 & Pharo.
The upstream
branch is supposed to track the changes in the master
branch of noha/JSONWebToken
The release-candidate
is the branch where our changes land before releasing a version.
Implementation of a JSON web token following RFC 7519 for Pharo and GemStone 64
The class JSONWebTokenTest
demonstrates how to encode/serialize a web
signature to a token string using compact base 64 notation as well as
deserialization:
testRoundtrip
| jws tokenString materialized |
jws := JsonWebSignature new
algorithmName: 'HS256';
payload: (JWTClaimsSet new
at: 'bar' put: 'foo').
jws symmetricKey: 'foobar'.
tokenString := jws compactSerialized.
materialized := JsonWebSignature materializeCompact: tokenString key: 'foobar'.
self assert: jws equals: materialized