multipass-auth 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
multipass/__init__.py ADDED
@@ -0,0 +1,84 @@
1
+ """Reusable browser-login building blocks: credentials first, the rest to follow."""
2
+
3
+ from . import browser as _browser
4
+ from . import config as _config
5
+ from . import credentials as _credentials
6
+ from .auth import (
7
+ IDPS,
8
+ SHIBBOLETH,
9
+ IdP,
10
+ LoginError,
11
+ LoginState,
12
+ LoginTarget,
13
+ MAX_LOGIN_STEPS,
14
+ RECOGNISERS,
15
+ Recogniser,
16
+ ensure_logged_in,
17
+ is_logged_in,
18
+ log_in,
19
+ )
20
+ from .browser import (
21
+ BrowserUnavailable,
22
+ install_chromium,
23
+ open_context,
24
+ open_page,
25
+ save_debug_snapshot,
26
+ )
27
+ from .config import AuthConfig, StatePaths, resolve_state_dir
28
+ from .credentials import (
29
+ ConfigError,
30
+ CredentialNames,
31
+ Resolved,
32
+ parse_env_file,
33
+ resolve_credentials,
34
+ tty_available,
35
+ warn_if_world_readable,
36
+ )
37
+
38
+ __version__ = "0.0.1"
39
+
40
+
41
+ def configure(*, names: CredentialNames | None = None,
42
+ program: str | None = None) -> None:
43
+ """Brand the package for its host, in one call.
44
+
45
+ Dispatches to `credentials.configure` and `browser.configure`. Either
46
+ argument left as `None` keeps the current value. There is no reset to
47
+ defaults — a host that configured once has said what it is called.
48
+ For the full branding (paths included), construct an `AuthConfig` and
49
+ call its `apply()`.
50
+ """
51
+ _credentials.configure(names=names)
52
+ _browser.configure(program=program)
53
+
54
+ __all__ = [
55
+ "__version__",
56
+ "AuthConfig",
57
+ "StatePaths",
58
+ "resolve_state_dir",
59
+ "IdP",
60
+ "IDPS",
61
+ "SHIBBOLETH",
62
+ "LoginError",
63
+ "LoginTarget",
64
+ "LoginState",
65
+ "MAX_LOGIN_STEPS",
66
+ "RECOGNISERS",
67
+ "Recogniser",
68
+ "ensure_logged_in",
69
+ "is_logged_in",
70
+ "log_in",
71
+ "BrowserUnavailable",
72
+ "install_chromium",
73
+ "open_context",
74
+ "open_page",
75
+ "save_debug_snapshot",
76
+ "ConfigError",
77
+ "CredentialNames",
78
+ "Resolved",
79
+ "configure",
80
+ "parse_env_file",
81
+ "resolve_credentials",
82
+ "tty_available",
83
+ "warn_if_world_readable",
84
+ ]