2025-02-09 11:36:37 +00:00
|
|
|
using AIStudio.Tools.ERIClient.DataModel;
|
2025-05-04 12:59:30 +00:00
|
|
|
using AIStudio.Tools.PluginSystem;
|
2025-01-13 18:51:26 +00:00
|
|
|
|
|
|
|
namespace AIStudio.Tools;
|
|
|
|
|
|
|
|
public static class AuthMethodsV1Extensions
|
|
|
|
{
|
2025-05-04 12:59:30 +00:00
|
|
|
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AuthMethodsV1Extensions).Namespace, nameof(AuthMethodsV1Extensions));
|
|
|
|
|
2025-01-13 18:51:26 +00:00
|
|
|
public static string DisplayName(this AuthMethod authMethod) => authMethod switch
|
|
|
|
{
|
2025-05-04 12:59:30 +00:00
|
|
|
AuthMethod.NONE => TB("None"),
|
|
|
|
AuthMethod.USERNAME_PASSWORD => TB("Username & Password"),
|
|
|
|
AuthMethod.KERBEROS => TB("SSO (Kerberos)"),
|
|
|
|
AuthMethod.TOKEN => TB("Access Token"),
|
2025-01-13 18:51:26 +00:00
|
|
|
|
2025-05-04 12:59:30 +00:00
|
|
|
_ => TB("Unknown authentication method"),
|
2025-01-13 18:51:26 +00:00
|
|
|
};
|
|
|
|
}
|