What's Changed
- New abstract Strategy class instead of an interface.
- The verify callback strategies receive is now part of the Strategy class types
- The verify callback now receives a single object as argument, the type comes from the Strategy class generics.
- The strategies
authenticate
method receives athrowOnError
option, if defined it will throw an AuthorizationError instead of a 401 response in case of errors and iffailureRedirect
is not set. - The strategies
authenticate
method receives asessionErrorKey
where it will set the error message in case of a redirect. It defaults to theauth:error
key. - The Authenticator now receives the
throwOnError
options upon instantiation (optional) and allow it as option in theauthenticate
method to overwrite it, useful to enable it by default. - The Authenticator now receives the
sessionErrorKey
and defaults toauth:error
. - Don't export the strategies with the package, but keep the code until they are on a different package.
Full Changelog: v2.6.0...v3.0.0