/// <summary> /// Initializes a new instance of the <see cref="YubikeyCheckAttribute"/> class. /// </summary> /// <param name="configuration"> The configuration. </param> /// <param name="client">The implementation of <see cref="IYubicoClient"/> to use.</param> public YubikeyCheckAttribute(YubikeyConfiguration configuration, IYubicoClient client) : base(configuration) { this.Configuration = configuration; this.Client = client; if (configuration == null || configuration.Server == null || client == null) { return; } var server = this.Configuration.Server; this.Client.ClientId = server.ClientId; this.Client.ApiKey = server.ApiKey; this.Client.SyncLevel = server.SyncLevel; }
public YubikeyCheckAttribute() : this(YubikeyConfiguration.DeserializeConfiguration(), new YubicoClientAdapter()) { }
public static IHtmlString YubikeyInput(this HtmlHelper htmlHelper) { return(YubikeyInput(htmlHelper, YubikeyConfiguration.DeserializeConfiguration())); }