Skip to content

Repository files navigation

JSONWebToken for Pharo

Build Status

Overview

Implementation of a JSON web token following RFC 7519 for Pharo.

Installation

For pharo9 and above use

Metacellonewbaseline:'JSONWebToken';
repository:'github://noha/JSONWebToken/source';
load

Usage

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
| jwstokenStringmaterialized |
jws :=JsonWebSignaturenewalgorithmName:'HS256';
payload: (JWTClaimsSetnewat:'bar'put:'foo').
jws key:'foobar'.
tokenString := jws compactSerialized.
materialized :=JsonWebSignaturematerializeCompact: tokenString key:'foobar'.
selfassert: jws equals: materialized

Further Infos

About

A pharo implementation of JSON web token (JWT)

Topics

Resources

Stars

17 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages