private static string ChannelText(this TwoFactorChannel channel)
        {
            switch (channel)
            {
            case TwoFactorChannel.Authenticator: return("authenticator");

            case TwoFactorChannel.TextMessage: return("sms");

            case TwoFactorChannel.DuoSecurity: return("duo");

            case TwoFactorChannel.RSASecurID: return("rsa");

            case TwoFactorChannel.KeeperDNA: return("dna");

            case TwoFactorChannel.SecurityKey: return("key");

            default: return(channel.ToString().ToLowerInvariant());
            }
        }
Exemple #2
0
 public static string GetTwoFactorChannelText(this TwoFactorChannel channel)
 {
     return(TwoFactorChannels.TryGetValue(channel, out var text) ? text : channel.ToString());
 }