Show / Hide Table of Contents

UseCurrentAccessCode Method

UseCurrentAccessCode(SlotAccessCode)

Set the current access code the YubiKey slot is programmed with.

C#
public T UseCurrentAccessCode(SlotAccessCode code)

Parameters

Type Name Description
SlotAccessCode code

The SlotAccessCode to use.

Returns

T

The ConfigureStaticPassword instance

Exceptions

Type Condition
ArgumentException

Thrown if the access code is longer than MaxAccessCodeLength.

Remarks

There are two access code methods - UseCurrentAccessCode(SlotAccessCode) and SetNewAccessCode(SlotAccessCode). If the YubiKey slot is currently protected by an access code, it must be specified when you call UseCurrentAccessCode(SlotAccessCode). If you wish to retain the same access code, it must also be specified to SetNewAccessCode(SlotAccessCode). If you do not specify it as the new access code, then the slot will have its protection removed and have no access code.

In this article
Back to top Generated by DocFX