Closed aidantwoods closed 6 years ago
The general idea of this is to have a strong type for the protocol version and whitelisting used internally. It might be preferable to relax this back to accepting a string at the public API border for usability reasons though.
Friendly two week ping/reminder :)
cc @paragonie-scott
Instead of maintaining a whitelist of allowed protocol implementations in a switch/case buried in a method, the whitelist is now in
ParagonIE\Paseto\ProtocolCollection::WHITELIST
.Also make protocol version validation implicit in the construction of a
ProtocolCollection
, so that invalid nonsense protocol header strings just fail to construct aProtocolInterface
(instead of trying to validate the string values everywhere they are used).