mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 13:27:21 +00:00
22 lines
719 B
C#
22 lines
719 B
C#
using AIStudio.Tools.ERIClient.DataModel;
|
|
using AIStudio.Tools.PluginSystem;
|
|
|
|
namespace AIStudio.Tools;
|
|
|
|
public static class AuthMethodsV1Extensions
|
|
{
|
|
private static string TB(string fallbackEN) => I18N.I.T(fallbackEN, typeof(AuthMethodsV1Extensions).Namespace, nameof(AuthMethodsV1Extensions));
|
|
|
|
extension(AuthMethod authMethod)
|
|
{
|
|
public string DisplayName() => authMethod switch
|
|
{
|
|
AuthMethod.NONE => TB("None"),
|
|
AuthMethod.USERNAME_PASSWORD => TB("Username & Password"),
|
|
AuthMethod.KERBEROS => TB("SSO (Kerberos)"),
|
|
AuthMethod.TOKEN => TB("Access Token"),
|
|
|
|
_ => TB("Unknown authentication method"),
|
|
};
|
|
}
|
|
} |