Authenticate to the Enterprise Server with a non-password method. Note that many of these will open a URL for a browser-based login prompt, which may not be usable on headless installations. See :func:`authentication_methods` for a list of accepted methods. :param str method: Name of method to
(method: str, remember: bool = True)
| 69 | |
| 70 | |
| 71 | def authenticate_with_method(method: str, remember: bool = True): |
| 72 | """ |
| 73 | Authenticate to the Enterprise Server with a non-password method. Note that many of these will |
| 74 | open a URL for a browser-based login prompt, which may not be usable on headless installations. |
| 75 | See :func:`authentication_methods` for a list of accepted methods. |
| 76 | |
| 77 | :param str method: Name of method to use. |
| 78 | :param bool remember: Remember token in keychain |
| 79 | """ |
| 80 | if not is_connected(): |
| 81 | connect() |
| 82 | if not core.BNAuthenticateEnterpriseServerWithMethod(method, remember): |
| 83 | raise RuntimeError(last_error()) |
| 84 | |
| 85 | |
| 86 | def authentication_methods() -> List[Tuple[str, str]]: |
no test coverage detected