paragonie / paseto

Platform-Agnostic Security Tokens
https://paseto.io
Other
3.24k stars 108 forks source link

Usability/fix docs and convenience #41

Closed aidantwoods closed 6 years ago

aidantwoods commented 6 years ago

I noticed the docs still used the array syntax. I've also added a couple of ProtocolCollection named constructors for quickly creating collections of just one protocol version (i.e. to avoid needing to do something like new ProtocolCollection(new Version2) now it's ProtocolCollection::v2()).

Q: should ProtocolCollection::default() only permit version2? At present it adds all whitelisted protocols (see ef441b0).