Weaver: Workflow Execution Management Service (EMS); Application, Deployment and Execution Service (ADES); OGC API - Processes; WPS; CWL Application Package
Typing of AuthHandler on auth parameter for the WeaverClient do not permit other/external handlers.
How to Reproduce
import os
from requests_magpie import MagpieAuth
from weaver.cli import WeaverClient
client = WeaverClient(
url="https://hirondelle.crim.ca/weaver/",
auth=MagpieAuth(
magpie_url="https://hirondelle.crim.ca/magpie/",
username=os.getenv("MAGPIE_USERNAME"),
password=os.getenv("MAGPIE_PASSWORD"),
)
)
Expected behavior
A Protocol (or other similar?) typing definition should be used to allow any AuthHandler-like implementation that provides all necessary parameters and operations. Namely, that would be the __call__ method that must set the relevant HTTP method, headers, etc. definitions based on the provided request object as input.
Describe the bug
Typing of
AuthHandler
onauth
parameter for theWeaverClient
do not permit other/external handlers.How to Reproduce
Expected behavior
A
Protocol
(or other similar?) typing definition should be used to allow anyAuthHandler
-like implementation that provides all necessary parameters and operations. Namely, that would be the__call__
method that must set the relevant HTTP method, headers, etc. definitions based on the providedrequest
object as input.