Closed mishaschwartz closed 7 months ago
@mishaschwartz
Why not use the MagpieAuth
object directly?
https://pavics-weaver.readthedocs.io/en/latest/cli.html#authentication-example
Alternatively, could also use https://pavics-weaver.readthedocs.io/en/latest/autoapi/weaver/cli/index.html#weaver.cli.CookieAuthHandler
Why not use the MagpieAuth object directly? Alternatively, could also use ... [CookieAuthHandler]
Both of these make a request to a URL to obtain a token/cookie. The session strategy is for the use-case where you already have the session cookies. It's the same use-case that motivated this change (https://github.com/bird-house/birdhouse-deploy/pull/407)
Add option to make requests with
WeaverClient
using arequests.Session
instance.This allows requests to be made with the session cookies that may already be attached to this
requests.Session
instance.Useful as an alternative to authenticating with an
auth
argument when a user has already authenticated and they have access to the session cookie. This is mostly so that we can take advantage of this feature with weaver https://github.com/bird-house/birdhouse-deploy/pull/407