OathSession Class
Namespace: Yubico.YubiKey.Oath Assembly: Yubico.YubiKey.dllThe main entry-point for all OATH related operations.
public sealed class OathSession : ApplicationSession, IDisposable
Implements
Constructors
Name | Description |
---|---|
OathSession(IYubiKeyDevice, ScpKeyParameters) | Create an instance of |
Properties
Name | Description |
---|---|
IsPasswordProtected | Indicates whether the OATH application on the YubiKey is password-protected or not, whether password verification is required before operations can be executed. |
KeyCollector | The Delegate this class will call when it needs a password to unlock the OATH application. |
Methods
Name | Description |
---|---|
AddCredential(String) | Adds a credential from the string that received from the QR reader or manually from the server. |
AddCredential(String, String, CredentialType, CredentialPeriod) | Adds a new credential or overwrites the existing one on the YubiKey with default parameters. |
AddCredential(Credential) | Adds a new credential or overwrites the existing one on the YubiKey. |
CalculateAllCredentials(ResponseFormat) | Gets OTP (One-Time Password) values for all configured credentials on the YubiKey. |
CalculateCredential(String, String, CredentialType, CredentialPeriod, ResponseFormat) | Gets an OTP code for the specific credential. |
CalculateCredential(Credential, ResponseFormat) | Gets an OTP (One-Time Password) value for the specific credential on the YubiKey. |
Dispose(Boolean) | |
GetCredentials() | Gets all configured credentials on the YubiKey. |
RemoveCredential(String, String, CredentialType, CredentialPeriod) | Removes an existing credential from the YubiKey. |
RemoveCredential(Credential) | Removes an existing credential from the YubiKey. |
RenameCredential(String, String, String, String, CredentialType, CredentialPeriod) | Renames an existing credential on the YubiKey by setting new issuer and account names. |
RenameCredential(Credential, String, String) | Renames an existing credential on the YubiKey by setting new issuer and account names. |
ResetApplication() | Resets the YubiKey's OATH application back to a factory default state. |
SetPassword() | Sets the password. |
TrySetPassword(ReadOnlyMemory<Byte>, ReadOnlyMemory<Byte>) | Verify the |
TryUnsetPassword(ReadOnlyMemory<Byte>) | Try to set the OATH application in the YubiKey to no longer be password-protected. This operation requires verifying the current password provided. |
TryVerifyPassword() | Attempts to verify the password. |
TryVerifyPassword(ReadOnlyMemory<Byte>) | Try to verify using the given password. |
UnsetPassword() | Unsets the password. |
VerifyPassword() | Verify the password, throw an exception if the user cancels or the verification failed. |