File tree Expand file tree Collapse file tree 6 files changed +98
-0
lines changed
src/Yubico/YubiKey/Otp/Operations
tests/unit/Yubico/YubiKey/Otp/Operations Expand file tree Collapse file tree 6 files changed +98
-0
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,21 @@ public ConfigureChallengeResponse SetAllowUpdate(bool setConfig = true) =>
313313 /// <returns>The current <see cref="ConfigureChallengeResponse"/> instance.</returns>
314314 public ConfigureChallengeResponse UseButton ( bool setConfig = true ) =>
315315 Settings . UseButtonTrigger ( setConfig ) ;
316+
317+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberApiVisible(bool)"/>
318+ /// <returns>The current <see cref="ConfigureChallengeResponse"/> instance.</returns>
319+ public ConfigureChallengeResponse SetSerialNumberApiVisible ( bool setConfig = true ) =>
320+ Settings . SetSerialNumberApiVisible ( setConfig ) ;
321+
322+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberButtonVisible(bool)"/>
323+ /// <returns>The current <see cref="ConfigureChallengeResponse"/> instance.</returns>
324+ public ConfigureChallengeResponse SetSerialNumberButtonVisible ( bool setConfig = true ) =>
325+ Settings . SetSerialNumberButtonVisible ( setConfig ) ;
326+
327+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberUsbVisible(bool)"/>
328+ /// <returns>The current <see cref="ConfigureChallengeResponse"/> instance.</returns>
329+ public ConfigureChallengeResponse SetSerialNumberUsbVisible ( bool setConfig = true ) =>
330+ Settings . SetSerialNumberUsbVisible ( setConfig ) ;
316331 #endregion
317332 #endregion
318333 }
Original file line number Diff line number Diff line change @@ -262,6 +262,21 @@ public ConfigureHotp UseFastTrigger(bool setConfig = true) =>
262262 /// <returns>The current <see cref="ConfigureHotp"/> instance.</returns>
263263 public ConfigureHotp SendReferenceString ( bool setConfig = true ) =>
264264 Settings . SendReferenceString ( setConfig ) ;
265+
266+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberApiVisible(bool)"/>
267+ /// <returns>The current <see cref="ConfigureHotp"/> instance.</returns>
268+ public ConfigureHotp SetSerialNumberApiVisible ( bool setConfig = true ) =>
269+ Settings . SetSerialNumberApiVisible ( setConfig ) ;
270+
271+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberButtonVisible(bool)"/>
272+ /// <returns>The current <see cref="ConfigureHotp"/> instance.</returns>
273+ public ConfigureHotp SetSerialNumberButtonVisible ( bool setConfig = true ) =>
274+ Settings . SetSerialNumberButtonVisible ( setConfig ) ;
275+
276+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberUsbVisible(bool)"/>
277+ /// <returns>The current <see cref="ConfigureHotp"/> instance.</returns>
278+ public ConfigureHotp SetSerialNumberUsbVisible ( bool setConfig = true ) =>
279+ Settings . SetSerialNumberUsbVisible ( setConfig ) ;
265280 #endregion
266281 #endregion
267282
Original file line number Diff line number Diff line change @@ -177,5 +177,22 @@ public ConfigureNdef WithLanguage(string languageCode)
177177 _languageCode = languageCode ;
178178 return this ;
179179 }
180+
181+ #region Flags to Relay
182+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberApiVisible(bool)"/>
183+ /// <returns>The current <see cref="ConfigureNdef"/> instance.</returns>
184+ public ConfigureNdef SetSerialNumberApiVisible ( bool setConfig = true ) =>
185+ Settings . SetSerialNumberApiVisible ( setConfig ) ;
186+
187+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberButtonVisible(bool)"/>
188+ /// <returns>The current <see cref="ConfigureNdef"/> instance.</returns>
189+ public ConfigureNdef SetSerialNumberButtonVisible ( bool setConfig = true ) =>
190+ Settings . SetSerialNumberButtonVisible ( setConfig ) ;
191+
192+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberUsbVisible(bool)"/>
193+ /// <returns>The current <see cref="ConfigureNdef"/> instance.</returns>
194+ public ConfigureNdef SetSerialNumberUsbVisible ( bool setConfig = true ) =>
195+ Settings . SetSerialNumberUsbVisible ( setConfig ) ;
196+ #endregion
180197 }
181198}
Original file line number Diff line number Diff line change @@ -327,6 +327,21 @@ public ConfigureStaticPassword SetAllowUpdate(bool setConfig = true) =>
327327 /// <inheritdoc cref="OtpSettings{T}.AllowManualUpdate(bool)"/>
328328 public ConfigureStaticPassword AllowManualUpdate ( bool setConfig = true ) =>
329329 Settings . AllowManualUpdate ( setConfig ) ;
330+
331+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberApiVisible(bool)"/>
332+ /// <returns>The current <see cref="ConfigureStaticPassword"/> instance.</returns>
333+ public ConfigureStaticPassword SetSerialNumberApiVisible ( bool setConfig = true ) =>
334+ Settings . SetSerialNumberApiVisible ( setConfig ) ;
335+
336+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberButtonVisible(bool)"/>
337+ /// <returns>The current <see cref="ConfigureStaticPassword"/> instance.</returns>
338+ public ConfigureStaticPassword SetSerialNumberButtonVisible ( bool setConfig = true ) =>
339+ Settings . SetSerialNumberButtonVisible ( setConfig ) ;
340+
341+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberUsbVisible(bool)"/>
342+ /// <returns>The current <see cref="ConfigureStaticPassword"/> instance.</returns>
343+ public ConfigureStaticPassword SetSerialNumberUsbVisible ( bool setConfig = true ) =>
344+ Settings . SetSerialNumberUsbVisible ( setConfig ) ;
330345 #endregion
331346 #endregion
332347
Original file line number Diff line number Diff line change @@ -456,6 +456,21 @@ public ConfigureYubicoOtp SetAllowUpdate(bool setConfig = true) =>
456456 /// <returns>The current <see cref="ConfigureYubicoOtp"/> instance.</returns>
457457 public ConfigureYubicoOtp SendReferenceString ( bool setConfig = true ) =>
458458 Settings . SendReferenceString ( setConfig ) ;
459+
460+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberApiVisible(bool)"/>
461+ /// <returns>The current <see cref="ConfigureYubicoOtp"/> instance.</returns>
462+ public ConfigureYubicoOtp SetSerialNumberApiVisible ( bool setConfig = true ) =>
463+ Settings . SetSerialNumberApiVisible ( setConfig ) ;
464+
465+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberButtonVisible(bool)"/>
466+ /// <returns>The current <see cref="ConfigureYubicoOtp"/> instance.</returns>
467+ public ConfigureYubicoOtp SetSerialNumberButtonVisible ( bool setConfig = true ) =>
468+ Settings . SetSerialNumberButtonVisible ( setConfig ) ;
469+
470+ /// <inheritdoc cref="OtpSettings{T}.SetSerialNumberUsbVisible(bool)"/>
471+ /// <returns>The current <see cref="ConfigureYubicoOtp"/> instance.</returns>
472+ public ConfigureYubicoOtp SetSerialNumberUsbVisible ( bool setConfig = true ) =>
473+ Settings . SetSerialNumberUsbVisible ( setConfig ) ;
459474 #endregion
460475 #endregion
461476 }
Original file line number Diff line number Diff line change @@ -59,6 +59,27 @@ public void TestSpecifiedAndGeneratedKey()
5959 Assert . Equal ( ExceptionMessages . CantSpecifyKeyAndGenerate , ex . Message ) ;
6060 }
6161
62+ [ Fact ]
63+ public void TestSetSerialNumberApiVisible_ReturnsInstance ( )
64+ {
65+ ConfigureYubicoOtp result = _op . SetSerialNumberApiVisible ( true ) ;
66+ Assert . Same ( _op , result ) ;
67+ }
68+
69+ [ Fact ]
70+ public void TestSetSerialNumberButtonVisible_ReturnsInstance ( )
71+ {
72+ ConfigureYubicoOtp result = _op . SetSerialNumberButtonVisible ( true ) ;
73+ Assert . Same ( _op , result ) ;
74+ }
75+
76+ [ Fact ]
77+ public void TestSetSerialNumberUsbVisible_ReturnsInstance ( )
78+ {
79+ ConfigureYubicoOtp result = _op . SetSerialNumberUsbVisible ( true ) ;
80+ Assert . Same ( _op , result ) ;
81+ }
82+
6283 protected virtual void Dispose ( bool disposing )
6384 {
6485 if ( ! _disposedValue )
You can’t perform that action at this time.
0 commit comments