Commit Graph

11 Commits (47058098a0415f9c0f03148fcd86179bf83b3303)

Author SHA1 Message Date
Aydin Mercan 47058098a0
mod: tidy dependencies 2021-12-05 12:59:07 +03:00
Aydin Mercan a7afee7530
internal/publickey: add eddsa tests
Added tests for EdDSA keys. Subsequently, some fixes were introduced.
Also, ECDSA's test names were fixed to avoid collusions.

As a bonus some unused code were removed.
2021-12-05 12:38:31 +03:00
Aydin Mercan 365a8d3ee2
nix: remove the development flake
I don't use NixOS anymore and thus cannot keep up the flake provided for
development.
2021-12-04 12:16:01 +03:00
Aydin Mercan fa79a9a7bc
readme: add ci badge and goals clarification
As everyone is aware you don't need JWTs for OAuth. However, OIDC
requires them which is a main target, alongside almost every non-OIDC
(unfortunately) using JWT.

Furthermore, despite being labeled under "signatures" in the standard,
MACs aren't a goal in this library.
2021-12-04 12:12:13 +03:00
Aydin Mercan fbf3f89bcc
mod: update dependency 2021-12-04 11:50:25 +03:00
Aydin Mercan 67699f4a7c
jwk, internal/publickey: unmarshal -> decode
Currently encoding/json accepts duplicate fields in the json.
Since https://github.com/golang/go/issues/48298 got accepted,
we should use the decoder interface with Decoder.DisallowDuplicateFields
turned on when available. Its exact behavior will determine whether
json.RawMessage's will be re-unmarshaled or will follow the byte reader
path.
2021-12-04 10:55:00 +03:00
Aydin Mercan 8bc5579fad nix: add nix flake
Since I use NixOS, its only natural to add a flake development.
2021-11-08 15:44:10 +03:00
Aydin Mercan 82785c70eb internal/publickey: move from public jwk add tests
Moving algorithm specific jwk code to an internal module.
Not caring about it should be fine(?) to the end user as long
as the library remains vigilantic about it. Also, the crypto.PublicKey
in JWK isn't meant to be used directly anyway.
2021-11-03 20:41:03 +03:00
Aydin Mercan c69930c738 readme: expand the scope and minor additions
The following have been added to the README:
- Build requirements
- Disclaimer
- Goals and non-goals
- License
2021-11-02 12:11:23 +03:00
Aydin Mercan d014dca76d ci/github: fix typo 2021-11-02 10:50:03 +03:00
Aydin Mercan 17de1b90f9 initial commit
- Created the JWK definition with parsing key sets, needs more through
  poking for covering invalid state handling.

- Basic parsing tests with CI
2021-11-02 10:43:52 +03:00