Split clients: CAS / Default
-
Default
client authenticate using the default form (e.g in sharelatex@irisa: in/login
) -
CAS
client authenticate using a CAS form (e.g in raweb-latex: redirected from/login
)
- The client can use whatever client he wants
- The client can be give a factory method to build the right client according the the
base_url
:
-
https://sharelatex.irisa.fr
->Default
-
https://raweb-latex.irisa.fr
->CAS
- The client can be passed an url where the login page is (in raweb and sharelatex this is
/login
)
So in our case, instead of building the SyncClient
using:
client = SyncClient(base_url=BASE_URL, username=USERNAME, password=PASSWORD)
The cli could use:client = build_client(base_url, username, password)
@andradgu any thoughts ;) ?