frasertweedale / hs-jose

Haskell JOSE and JWT library
http://hackage.haskell.org/package/jose
Apache License 2.0
122 stars 46 forks source link

implement "non-empty array" restrictions #3

Closed frasertweedale closed 9 years ago

frasertweedale commented 9 years ago

Several places in the JOSE specs require non-empty arrays, but these requirements are not currently encapsulated by the types or checked by the parser.

These should be implemented using Data.List.NonEmpty.NonEmpty from the semigroups package. Orphan FromJSON and ToJSON instances will be needed for this type, too.

frasertweedale commented 9 years ago

Now have NonEmpty aeson instances and have employed NonEmpty where appropriate. If I missed one or two it will be a trivial fix now.