scitacean.auth.login_via_oauth#
- scitacean.auth.login_via_oauth(flow, configured_oauth_clients, scicat_url, open_browser=None, *, allow_http=False)[source]#
Get a SciCat token via single-sign-on.
- Parameters:
flow (
Literal['auto','normal','device']) – Type of login method to use for authentication. The default is to pick the best client for the current system.configured_oauth_clients (
Sequence[OAuthClient]) – Available OAuth clients to use for authentication.scicat_url (
str) – URL of the SciCat api.open_browser (
Callable[[str],SupportsClose] |None, default:None) – A function that opens a given URL in the user’s web browser. By default, the client either uses the system’s default browser or, in Jupyter, opens a browser through JavaScript. The return value is intended to close the browser window or at least release any auxiliary resources.allow_http (
bool, default:False) – Allow HTTP connections. Only used for requests to SciCat. The OAuth config is separate. This is insecure and should only be used for testing.
- Returns:
ExpiringToken– A valid SciCat token.