RenameCredential Method
RenameCredential(Credential, String, String)
Renames an existing credential on the YubiKey by setting new issuer and account names.
public void RenameCredential(Credential credential, string newIssuer, string newAccount)
Parameters
Type | Name | Description |
---|---|---|
Credential | credential | The |
System.String | newIssuer | The new issuer to set on the credential. The issuer is optional and can be null. |
System.String | newAccount | The new account name to set on the credential. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The credential to rename is null. Or the new account name to set is null, empty, or consists only of white-space characters. |
System.InvalidOperationException | There is no |
System.Security.SecurityException | Unable to verify password either because |
Remarks
This command is only available on the YubiKeys with firmware version 5.3.0 and later.
RenameCredential(String, String, String, String, CredentialType, CredentialPeriod)
Renames an existing credential on the YubiKey by setting new issuer and account names.
public Credential RenameCredential(string currentIssuer, string currentAccount, string newIssuer, string newAccount, CredentialType currentType, CredentialPeriod currentPeriod)
Parameters
Type | Name | Description |
---|---|---|
System.String | currentIssuer | The current credential's issuer. |
System.String | currentAccount | The current credential's account name. |
System.String | newIssuer | The new issuer to set on the credential. The issuer is optional and can be null. |
System.String | newAccount | The new account name to set on the credential. |
CredentialType | currentType | Indicates the CredentialType of the current credential as either HOTP or TOTP. The default value is TOTP. |
CredentialPeriod | currentPeriod | Indicates the CredentialPeriod of the current credential in seconds for TOTP code. It can only be 15, 30, or 60 seconds. For HOTP should be set to zero (Undefined). The default value is 30. |
Returns
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | There is no |
System.Security.SecurityException | Unable to verify password either because |
Remarks
This command is only available on the YubiKeys with firmware version 5.3.0 and later.