List of supported authentication backends on the server. If metadata has not been pulled, it will be pulled upon calling this. :return: List of Backend id <=> backend display name tuples :raises RuntimeError: If there was an error
(self)
| 162 | |
| 163 | @property |
| 164 | def auth_backends(self) -> List[Tuple[str, str]]: |
| 165 | """ |
| 166 | List of supported authentication backends on the server. |
| 167 | If metadata has not been pulled, it will be pulled upon calling this. |
| 168 | |
| 169 | :return: List of Backend id <=> backend display name tuples |
| 170 | :raises RuntimeError: If there was an error |
| 171 | """ |
| 172 | if not self.has_loaded_metadata: |
| 173 | self.load_metadata() |
| 174 | backend_ids = ctypes.POINTER(ctypes.c_char_p)() |
| 175 | backend_names = ctypes.POINTER(ctypes.c_char_p)() |
| 176 | count = ctypes.c_size_t() |
| 177 | if not core.BNRemoteGetAuthBackends(self._handle, backend_ids, backend_names, count): |
| 178 | raise RuntimeError(util._last_error()) |
| 179 | result = [] |
| 180 | for i in range(count.value): |
| 181 | result.append((core.pyNativeStr(backend_ids[i]), core.pyNativeStr(backend_names[i]))) |
| 182 | core.BNFreeStringList(backend_ids, count.value) |
| 183 | core.BNFreeStringList(backend_names, count.value) |
| 184 | return result |
| 185 | |
| 186 | @property |
| 187 | def is_admin(self) -> bool: |
nothing calls this directly
no test coverage detected