The recent change to split the main OPDS router into sub-routers for each supported version caused some issues in the auth middleware. Specifically, the /opds prefix was missing which caused the conditional check which allows basic auth for OPDS-specific routes to fail.
Accessing the request parts uri in an extension seems to be scoped to the current router. This means when the auth middleware attempted to extract the uri, it was now relative to the new sub-router (which in this case, would be /v1.2/*). To correct this, I just used the OriginalUri extractor.
I also used this as an opportunity to fix some of the session handling logic in the OPDS auth flow
Relates to https://github.com/stumpapp/stump/issues/346
The recent change to split the main OPDS router into sub-routers for each supported version caused some issues in the auth middleware. Specifically, the
/opds
prefix was missing which caused the conditional check which allows basic auth for OPDS-specific routes to fail.Accessing the request parts
uri
in an extension seems to be scoped to the current router. This means when the auth middleware attempted to extract theuri
, it was now relative to the new sub-router (which in this case, would be /v1.2/*). To correct this, I just used theOriginalUri
extractor.I also used this as an opportunity to fix some of the session handling logic in the OPDS auth flow