frasertweedale / hs-jose

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

optics for StringOrURI #34

Closed frasertweedale closed 7 years ago

frasertweedale commented 7 years ago

Currently StringOrURI uses some not very nice functions for parsing and getting at the possible values. Prisms would be better.

Also note that the current implementation is not quite right: we interpret anything that does not parse as a URI as an arbitrary string value, but according to https://tools.ietf.org/html/rfc7519#section-2, any value that contains a ':' MUST be a URI. So this should be fixed at the same time.