Table of Contents

Class ValidateResponse

Namespace
Yubico.YubiKey.Oath.Commands
Assembly
Yubico.YubiKey.dll

The response to the ValidateCommand command, containing the response from the oath application.

public class ValidateResponse : OathResponse, IYubiKeyResponseWithData<bool>, IYubiKeyResponse
Inheritance
object
ValidateResponse
Implements
Inherited Members

Constructors

ValidateResponse(ResponseApdu, ReadOnlyMemory<byte>)

Constructs a ValidateResponse instance based on a ResponseApdu received from the YubiKey.

public ValidateResponse(ResponseApdu responseApdu, ReadOnlyMemory<byte> calculatedResponse)

Parameters

responseApdu ResponseApdu

The ResponseApdu returned by the YubiKey.

calculatedResponse ReadOnlyMemory<byte>

The response that was calculated with a new generated challenge in ValidateComand.

Properties

Response

Gets the response.

public ReadOnlyMemory<byte> Response { get; }

Property Value

ReadOnlyMemory<byte>

The response that was calculated with a new generated challenge.

StatusCodeMap

Retrieves the details describing the processing state.

protected override YubiKeyResponse.ResponseStatusPair StatusCodeMap { get; }

Property Value

YubiKeyResponse.ResponseStatusPair

The ResponseStatus and a descriptive message, as a YubiKeyResponse.ResponseStatusPair.

Remarks

Implementers of subtypes can override this member to change or add mappings.

Methods

GetData()

Gets the response data.

public bool GetData()

Returns

bool

True if validation succeeded.

Exceptions

InvalidOperationException

Thrown when Status is not equal to Success.