Get a list of authentication methods accepted by the Enterprise Server. :return: List of ( , ) tuples
()
| 84 | |
| 85 | |
| 86 | def authentication_methods() -> List[Tuple[str, str]]: |
| 87 | """ |
| 88 | Get a list of authentication methods accepted by the Enterprise Server. |
| 89 | |
| 90 | :return: List of (<method name>, <method display name>) tuples |
| 91 | """ |
| 92 | if not is_connected(): |
| 93 | connect() |
| 94 | methods = ctypes.POINTER(ctypes.c_char_p)() |
| 95 | names = ctypes.POINTER(ctypes.c_char_p)() |
| 96 | count = core.BNGetEnterpriseServerAuthenticationMethods(methods, names) |
| 97 | results = [] |
| 98 | for i in range(count): |
| 99 | results.append((core.pyNativeStr(methods[i]), core.pyNativeStr(names[i]))) |
| 100 | core.BNFreeStringList(methods, count) |
| 101 | core.BNFreeStringList(names, count) |
| 102 | return results |
| 103 | |
| 104 | |
| 105 | def deauthenticate(): |
nothing calls this directly
no test coverage detected