Tonic and Axum are quite closely related; From a tower perspective the
main difference is in the Error type in the body for their Response.
This refactor the code a little bit and add conversions from AuthError
to a tonic's Response such that the exact same code can be used by both
Axum and tonic services
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
- JwtSource:Bearer renamed to AuthorizationHeader for more consistency with jwt terminology
- documentation added
- the token cookie should be taken from request not from the tower-cookies middleware jar
- dependency on tower-cookies is no longer needed
- tests added
* feat: working but naive implementation of named cookie as jwt source
* refactor: add with_jwt_source to JwtAuthorizer. Make Bearer default
* fix: fix the demo-server. Remove JWTSource
* refactor: rename with_jwt_source() -> jwt_source()