MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / auth_backends

Method auth_backends

python/collaboration/remote.py:164–184  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls 2

load_metadataMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected